Skip to content

Commit

Permalink
fix: disable CGO in dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
flohansen committed Jun 13, 2024
1 parent 06e7316 commit edb7f75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build/server.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ RUN apk update && apk add gcc musl-dev

WORKDIR /usr/src/app
COPY . .
RUN CGO_ENABLED=1 go build -o main cmd/main.go
RUN CGO_ENABLED=0 go build -o main cmd/main.go

FROM scratch

COPY --from=builder /usr/src/app/main /main

EXPOSE 3000
ENTRYPOINT [ "/main" ]
CMD [ "/main" ]

0 comments on commit edb7f75

Please sign in to comment.