Files
deceptifeed/Dockerfile
Ryan Smith c0d8651c7f build: clean ./bin/ for Docker build
Running `make all` before `docker build` would result in unwanted binaries being copied from `./bin/` into the Docker image (via `COPY . .`).

This change updates the Docker build to run `make clean build`, which removes the bin directory then builds a fresh binary.

This approach was chosen over including a `.dockerignore` file or using `COPY --exclude ...` (currently listed as unstable).
2025-05-22 10:57:23 -07:00

12 lines
270 B
Docker

# syntax=docker/dockerfile:1
FROM golang:latest AS build-stage
WORKDIR /build
COPY . .
RUN git update-index -q --refresh
RUN make clean build
FROM alpine:latest
RUN apk add --no-cache tzdata
WORKDIR /data
COPY --from=build-stage /build/bin /
ENTRYPOINT ["/deceptifeed"]