mirror of
https://github.com/r-smith/deceptifeed.git
synced 2025-10-23 00:12:22 +00:00
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).
This commit is contained in:
@@ -3,7 +3,7 @@ FROM golang:latest AS build-stage
|
||||
WORKDIR /build
|
||||
COPY . .
|
||||
RUN git update-index -q --refresh
|
||||
RUN make
|
||||
RUN make clean build
|
||||
|
||||
FROM alpine:latest
|
||||
RUN apk add --no-cache tzdata
|
||||
|
Reference in New Issue
Block a user