mirror of https://github.com/lus/pasty.git
docker: Disable CGO
Isnt needed by our code, and breaks distroless Signed-off-by: baalajimaestro <me@baalajimaestro.me>
This commit is contained in:
parent
612f0e8977
commit
e750fe2cc7
|
@ -11,13 +11,14 @@ RUN go mod download
|
|||
# Build the application
|
||||
ARG PASTY_VERSION=unset-debug
|
||||
COPY . .
|
||||
ENV CGO_ENABLED=0
|
||||
RUN go build \
|
||||
-o pasty \
|
||||
-ldflags "\
|
||||
-X github.com/lus/pasty/internal/static.Version=$PASTY_VERSION" \
|
||||
./cmd/pasty/main.go
|
||||
|
||||
# Run the application in an empty alpine environment
|
||||
# Run the application on distroless
|
||||
FROM gcr.io/distroless/base:latest
|
||||
WORKDIR /root
|
||||
COPY --from=build /app/pasty .
|
||||
|
|
Loading…
Reference in New Issue