@@ -3,7 +3,7 @@ ARG GO_VERSION=1.17
3
3
ARG XX_VERSION=1.1.0
4
4
5
5
ARG LIBGIT2_IMG=ghcr.io/fluxcd/golang-with-libgit2-all
6
- ARG LIBGIT2_TAG=v0.1.1
6
+ ARG LIBGIT2_TAG=v0.1.2
7
7
8
8
FROM ${LIBGIT2_IMG}:${LIBGIT2_TAG} AS libgit2-libs
9
9
@@ -82,10 +82,10 @@ ENV CGO_ENABLED=1
82
82
83
83
# Instead of using xx-go, (cross) compile with vanilla go leveraging musl tool chain.
84
84
RUN export $(cat build/musl/$(xx-info alpine-arch).env | xargs) && \
85
- export LIBRARY_PATH="/usr/local/$(xx-info triple):/usr/local/$(xx-info triple)/lib64" && \
86
- export PKG_CONFIG_PATH="/usr/local/$(xx-info triple)/lib/pkgconfig:/usr/local/$(xx-info triple)/lib64/pkgconfig" && \
87
- export CGO_LDFLAGS="$(pkg-config --static --libs --cflags libssh2 openssl libgit2) -static" && \
88
- GOARCH=$TARGETARCH go build \
85
+ export LIBRARY_PATH="/usr/local/$(xx-info triple):/usr/local/$(xx-info triple)/lib64" && \
86
+ export PKG_CONFIG_PATH="/usr/local/$(xx-info triple)/lib/pkgconfig:/usr/local/$(xx-info triple)/lib64/pkgconfig" && \
87
+ export CGO_LDFLAGS="$(pkg-config --static --libs --cflags libssh2 openssl libgit2) -static" && \
88
+ GOARCH=$TARGETARCH go build \
89
89
-ldflags "-s -w" \
90
90
-tags 'netgo,osusergo,static_build' \
91
91
-o /source-controller -trimpath main.go;
@@ -98,7 +98,7 @@ FROM alpine:3.16
98
98
99
99
ARG TARGETPLATFORM
100
100
RUN apk --no-cache add ca-certificates \
101
- && update-ca-certificates
101
+ && update-ca-certificates
102
102
103
103
# Create minimal nsswitch.conf file to prioritize the usage of /etc/hosts over DNS queries.
104
104
# https://github.com/gliderlabs/docker-alpine/issues/367#issuecomment-354316460
0 commit comments