From e23afa355a58192aa2e93347f65af71bf0604ba2 Mon Sep 17 00:00:00 2001 From: Michal Maly Date: Thu, 12 Mar 2026 18:51:32 +0100 Subject: [PATCH] Fix Docker build context --- .dockerignore | 1 - Dockerfile | 5 ++++- docker-compose.yml | 2 -- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.dockerignore b/.dockerignore index 5a83beb..6f0ae65 100644 --- a/.dockerignore +++ b/.dockerignore @@ -2,5 +2,4 @@ bin dist config.json -mqqt-scrubber docs/All connections.json \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 217ee6d..5e514c7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,10 @@ WORKDIR /src COPY go.mod go.sum ./ RUN go mod download -COPY . . +COPY cmd ./cmd +COPY internal ./internal +COPY config.example.json ./config.example.json +RUN test -f ./cmd/mqqt-scrubber/main.go || (echo "cmd/mqqt-scrubber/main.go is missing from the Docker build context; verify the checkout, sparse-checkout settings, and build context path" >&2; exit 1) RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /out/mqqt-scrubber ./cmd/mqqt-scrubber FROM alpine:3.20 diff --git a/docker-compose.yml b/docker-compose.yml index 6329dc2..ac1ef90 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.8" - services: mqqt-scrubber: build: