Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to find context directory when deploying via compose #275

Closed
2 tasks done
paulrobinsontkd opened this issue Dec 11, 2023 · 0 comments
Closed
2 tasks done

Unable to find context directory when deploying via compose #275

paulrobinsontkd opened this issue Dec 11, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@paulrobinsontkd
Copy link

⚠️ Please verify that this bug has NOT been reported before.

  • I checked and didn't find similar issue

🛡️ Security Policy

Description

I am attempting to deploy a docker container from https://github.com/eko/pihole-exporter

[+] Running 1/1
 ✔ Container pihole-exporter  Started                                                               0.0s 
[+] Running 1/1
 ! pihole-exporter Warning                                                                          1.3s 
[+] Building 0.0s (0/0)                                                                   docker:default
unable to prepare context: path "/share/docker/build/pihole-exporter/" not found

Docker compose file

version: "3.6"
services:
  pihole-exporter:
    build:
      context: /share/docker/build/pihole-exporter/
      dockerfile: /share/docker/build/pihole-exporter/Dockerfile
    image: ekofr/pihole-exporter:amd64
    container_name: pihole-exporter
    ports:
      - 9617:9617/tcp
    expose:
      - 9617
    environment:
      PIHOLE_HOSTNAME: 192.168.1.200,192.168.1.201
      PIHOLE_PORT: 80
      PIHOLE_PASSWORD: XXXXX
      INTERVAL: 30s
      PORT: 9617
    networks:
      qnet-static-eth4:
        ipv4_address: 192.168.10.202
    restart: always
networks:
  qnet-static-eth4:
    external: true

If i try to deploy via dockge it is unable to find the directories for context and dockerfile

However if i deploy via the OS command line i have no issues

[admin@qnap pihole-exporter]# docker compose -f compose.yaml up -d
[+] Running 0/1
 ⠿ pihole-exporter Warning                                                                                         1.7s
[+] Building 0.9s (14/14) FINISHED
 => [internal] load build definition from Dockerfile                                                               0.0s
 => => transferring dockerfile: 84B                                                                                0.0s
 => [internal] load .dockerignore                                                                                  0.0s
 => => transferring context: 2B                                                                                    0.0s
 => [internal] load metadata for docker.io/library/golang:1.21.5-alpine3.17                                        0.8s
 => [auth] library/golang:pull token for registry-1.docker.io                                                      0.0s
 => [stage-1 1/2] WORKDIR /root/                                                                                   0.0s
 => [internal] load build context                                                                                  0.0s
 => => transferring context: 3.55kB                                                                                0.0s
 => [builder 1/6] FROM docker.io/library/golang:1.21.5-alpine3.17@sha256:92cb87af996ec6befc85f0aec27e12ead2fab396  0.0s
 => CACHED [builder 2/6] WORKDIR /go/src/github.com/eko/pihole-exporter                                            0.0s
 => CACHED [builder 3/6] COPY . .                                                                                  0.0s
 => CACHED [builder 4/6] RUN apk --no-cache add git alpine-sdk                                                     0.0s
 => CACHED [builder 5/6] RUN GO111MODULE=on go mod vendor                                                          0.0s
 => CACHED [builder 6/6] RUN CGO_ENABLED=0 GOOS=$OS GOARCH=$ARCH go build -ldflags '-s -w' -o binary ./            0.0s
 => CACHED [stage-1 2/2] COPY --from=builder /go/src/github.com/eko/pihole-exporter/binary pihole-exporter         0.0s
 => exporting to image                                                                                             0.0s
 => => exporting layers                                                                                            0.0s
 => => writing image sha256:d3c26371bde522987fba618c4aab12dd7692c5facf9a90bd3ddbcb57b132ecbc                       0.0s
 => => naming to docker.io/ekofr/pihole-exporter:amd64                                                             0.0s
[+] Running 1/1
 ⠿ Container pihole-exporter  Started                                                                              0.5s
[admin@qnap pihole-exporter]#

👟 Reproduction steps

Deployed dcoker compose file with build and context parameters

👀 Expected behavior

Deploy contain and build custom image

😓 Actual Behavior

Fails to find context directory and will not bring up container

Dockge Version

1.2.0

💻 Operating System and Arch

Linux qnap 5.10.60-qnap #1 SMP Tue Sep 26 01:46:28 CST 2023 x86_64 GNU/Linux

🌐 Browser

N/A

🐋 Docker Version

Docker version 20.10.22-qnap7, build 57ed8b8

🟩 NodeJS Version

Unknown

📝 Relevant log output

[+] Running 1/1
 ✔ Container pihole-exporter  Started                                                               0.0s 
[+] Running 1/1
 ! pihole-exporter Warning                                                                          1.3s 
[+] Building 0.0s (0/0)                                                                   docker:default
unable to prepare context: path "/share/docker/build/pihole-exporter/" not found
@paulrobinsontkd paulrobinsontkd added the bug Something isn't working label Dec 11, 2023
Repository owner locked and limited conversation to collaborators Dec 11, 2023
@louislam louislam converted this issue into discussion #277 Dec 11, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant