From 574ddd2e08ab37a62154482cb2a4642a6deeff29 Mon Sep 17 00:00:00 2001 From: Yanujz Date: Sun, 20 Sep 2026 12:07:20 +0200 Subject: [PATCH] Ship the binary in the runtime image and gate it in CI The multi-stage Dockerfile never copied /epmon into the runtime stage, so the documented docker compose path exited immediately. Add the missing COPY, and cover the container path in CI with a build plus a version smoke run (entrypoint form, since ENTRYPOINT carries the config flag). Fixes #67 --- .github/workflows/ci.yml | 10 ++++++++++ Dockerfile | 1 + 2 files changed, 11 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf819e1..23c8864 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,3 +42,13 @@ jobs: go run ./cmd/epmon validate --config config.example.json - run: go vet ./... - run: go test -race ./... + docker: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: image builds and runs + run: | + docker build -t epmon:ci . + docker run --rm --entrypoint /epmon epmon:ci version + - name: compose file parses + run: docker compose config diff --git a/Dockerfile b/Dockerfile index 19de667..80ba285 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,6 +14,7 @@ RUN CGO_ENABLED=0 go build -trimpath \ FROM alpine:3.21 RUN adduser -D -H epmon +COPY --from=build /epmon /epmon USER epmon WORKDIR /data EXPOSE 8080