mirror of
https://github.com/k3s-io/k3s.git
synced 2026-06-10 17:32:58 -04:00
Install binutils-gold only for arm64 builds
Signed-off-by: Michael Moll <kvedulv@kvedulv.de>
This commit is contained in:
parent
ed7141a2ed
commit
39ccf3e075
2 changed files with 9 additions and 4 deletions
|
|
@ -6,8 +6,9 @@ RUN apk -U --no-cache add \
|
|||
bash git gcc musl-dev docker vim less file curl wget ca-certificates jq linux-headers \
|
||||
zlib-dev tar zip squashfs-tools npm coreutils python3 py3-pip openssl-dev libffi-dev libseccomp \
|
||||
libseccomp-dev libseccomp-static make libuv-static sqlite-dev sqlite-static libselinux \
|
||||
libselinux-dev zlib-dev zlib-static zstd pigz alpine-sdk binutils-gold btrfs-progs-dev \
|
||||
libselinux-dev zlib-dev zlib-static zstd pigz alpine-sdk btrfs-progs-dev \
|
||||
btrfs-progs-static gawk yq pipx \
|
||||
&& [ "$(go env GOARCH)" = "arm64" ] && apk -U --no-cache add binutils-gold || true \
|
||||
&& [ "$(go env GOARCH)" = "amd64" ] && apk -U --no-cache add mingw-w64-gcc || true
|
||||
|
||||
# Install AWS CLI
|
||||
|
|
@ -21,7 +22,7 @@ RUN case "$(go env GOARCH)" in \
|
|||
s390x) TRIVY_ARCH="s390x" ;; \
|
||||
*) TRIVY_ARCH="" ;; \
|
||||
esac && \
|
||||
if [ -n "${TRIVY_ARCH}" ]; then \
|
||||
if [ -n "${TRIVY_ARCH}" ]; then \
|
||||
wget --no-verbose "https://github.com/aquasecurity/trivy/releases/download/v${TRIVY_VERSION}/trivy_${TRIVY_VERSION}_Linux-${TRIVY_ARCH}.tar.gz" \
|
||||
&& tar -zxvf "trivy_${TRIVY_VERSION}_Linux-${TRIVY_ARCH}.tar.gz" \
|
||||
&& mv trivy /usr/local/bin; \
|
||||
|
|
@ -37,7 +38,7 @@ RUN rm -rf /go/src /go/pkg
|
|||
RUN if [ "$(go env GOARCH)" = "amd64" ]; then \
|
||||
curl -sL https://raw.githubusercontent.com/golangci/golangci-lint/refs/tags/v2.7.2/install.sh | sh -s -- v2.7.2; \
|
||||
fi
|
||||
|
||||
|
||||
# Set SELINUX environment variable
|
||||
ARG SELINUX=true
|
||||
ENV SELINUX=${SELINUX}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,11 @@ FROM ${GOLANG} AS infra
|
|||
RUN apk -U --no-cache add bash git gcc musl-dev docker vim less file curl wget ca-certificates jq linux-headers \
|
||||
zlib-dev tar zip squashfs-tools npm coreutils openssl-dev libffi-dev libseccomp libseccomp-dev \
|
||||
libseccomp-static make libuv-static sqlite-dev sqlite-static libselinux libselinux-dev zlib-dev zlib-static \
|
||||
zstd pigz alpine-sdk binutils-gold btrfs-progs-dev btrfs-progs-static gawk yq pipx \
|
||||
zstd pigz alpine-sdk btrfs-progs-dev btrfs-progs-static gawk yq pipx \
|
||||
&& \
|
||||
if [ "$(go env GOARCH)" = "arm64" ]; then \
|
||||
apk -U --no-cache add binutils-gold; \
|
||||
fi \
|
||||
&& \
|
||||
if [ "$(go env GOARCH)" = "amd64" ]; then \
|
||||
apk -U --no-cache add mingw-w64-gcc; \
|
||||
|
|
|
|||
Loading…
Reference in a new issue