Skip to content

Commit

Permalink
build: remove unecessary files in final image
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jabuxas committed Oct 18, 2024
1 parent ecb1475 commit 5c951b3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ WORKDIR /app

COPY go.mod go.sum ./

# this is needed because we embed these files into the binary
COPY static/ ./static/

COPY templates/ ./templates

RUN go mod download
Expand All @@ -17,7 +17,5 @@ RUN CGO_ENABLED=0 GOOS=linux go build -o /abyss
FROM scratch

COPY --from=builder /abyss /abyss
COPY --from=builder /app/static /static
COPY --from=builder /app/templates /templates

CMD ["/abyss"]

0 comments on commit 5c951b3

Please sign in to comment.