Skip to content

Commit e48c79c

Browse files
committed
disabled CGO
1 parent 698c9e2 commit e48c79c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ RUN --mount=type=cache,target=$GOPATH/pkg/mod go generate ./cmd/frontend/assets/
3636
RUN go tool templ generate
3737

3838
# build a fully standalone binary with zero dependencies
39-
RUN --mount=type=cache,target=$GOPATH/pkg/mod GOOS=linux go build -ldflags='-s -w' -trimpath -o /bin/aftermath .
39+
RUN --mount=type=cache,target=$GOPATH/pkg/mod CGO_ENABLED=0 GOOS=linux go build -ldflags='-s -w' -trimpath -o /bin/aftermath .
4040

4141
# Make a scratch container with required files and binary
4242
FROM scratch
4343

4444
ENV TZ=Etc/UTC
4545
ENV ZONEINFO=/zoneinfo.zip
46-
COPY --from=builder-go /bin/aftermath /go/bin/app
46+
COPY --from=builder-go /bin/aftermath /app
4747
COPY --from=builder-go /usr/local/go/lib/time/zoneinfo.zip /
4848
COPY --from=builder-go /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
4949

50-
ENTRYPOINT [ "/go/bin/app" ]
50+
ENTRYPOINT [ "/app" ]

0 commit comments

Comments
 (0)