build: remove unecessary files in final image

These aren't needed anymore because we started embedding `static` and
`templates` directly into the binary, so that makes it easier to:

1. Distribute
2. Setup
3. Run
This commit is contained in:
jabuxas 2024-10-18 11:26:43 -03:00
parent ecb147533a
commit 5c951b3a6d

View File

@ -4,8 +4,8 @@ WORKDIR /app
COPY go.mod go.sum ./ COPY go.mod go.sum ./
# this is needed because we embed these files into the binary
COPY static/ ./static/ COPY static/ ./static/
COPY templates/ ./templates COPY templates/ ./templates
RUN go mod download RUN go mod download
@ -17,7 +17,5 @@ RUN CGO_ENABLED=0 GOOS=linux go build -o /abyss
FROM scratch FROM scratch
COPY --from=builder /abyss /abyss COPY --from=builder /abyss /abyss
COPY --from=builder /app/static /static
COPY --from=builder /app/templates /templates
CMD ["/abyss"] CMD ["/abyss"]