1
0
Fork 0
mirror of https://github.com/louislam/dockge.git synced 2026-03-03 02:06:55 -05:00

Unable to find context directory when deploying via compose #64

Closed
opened 2026-02-20 13:10:13 -05:00 by deekerman · 0 comments
Owner

Originally created by @paulrobinsontkd on GitHub (Dec 11, 2023).

⚠️ 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
Originally created by @paulrobinsontkd on GitHub (Dec 11, 2023). ### ⚠️ Please verify that this bug has NOT been reported before. - [X] I checked and didn't find similar issue ### 🛡️ Security Policy - [X] I agree to have read this project [Security Policy](https://github.com/louislam/dockge/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 ```shell [+] 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 ```
deekerman 2026-02-20 13:10:13 -05:00
  • closed this issue
  • added the
    bug
    label
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/dockge-louislam#64
No description provided.