32 lines
1.3 KiB
Docker
32 lines
1.3 KiB
Docker
FROM registry.suse.com/bci/bci-base:15.6
|
|
|
|
ARG DAPPER_HOST_ARCH
|
|
ENV ARCH=${DAPPER_HOST_ARCH}
|
|
|
|
RUN zypper -n update && \
|
|
zypper -n install bash git binutils glibc-devel-static gcc vim less file tar gzip curl sed wget ca-certificates
|
|
|
|
ENV GOLANG_ARCH_amd64=amd64 GOLANG_ARCH_arm=armv6l GOLANG_ARCH_arm64=arm64 GOLANG_ARCH=GOLANG_ARCH_${ARCH} \
|
|
GOPATH=/go CGO_ENABLED=0 PATH=/go/bin:/usr/local/go/bin:${PATH} SHELL=/bin/bash
|
|
RUN curl -sLf https://go.dev/dl/go1.23.6.linux-${ARCH}.tar.gz | tar -xzf - -C /usr/local/
|
|
# workaround for https://bugzilla.suse.com/show_bug.cgi?id=1183043
|
|
RUN if [ "${ARCH}" == "arm64" ]; then \
|
|
zypper -n install binutils-gold ; \
|
|
fi
|
|
|
|
RUN if [ "${ARCH}" = "amd64" ]; then \
|
|
curl -sL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.64.5; \
|
|
fi
|
|
RUN curl -sL https://get.helm.sh/helm-v3.3.0-linux-${ARCH}.tar.gz | tar xvzf - -C /usr/local/bin --strip-components=1
|
|
|
|
ENV DAPPER_ENV REPO TAG DRONE_TAG CROSS
|
|
ENV DAPPER_SOURCE /go/src/github.com/rancher/aks-operator/
|
|
ENV DAPPER_OUTPUT ./bin ./dist
|
|
ENV DAPPER_DOCKER_SOCKET true
|
|
ENV DAPPER_RUN_ARGS "-v aks-operator-pkg:/go/pkg -v aks-operator-cache:/root/.cache"
|
|
ENV HOME ${DAPPER_SOURCE}
|
|
WORKDIR ${DAPPER_SOURCE}
|
|
|
|
ENTRYPOINT ["./scripts/entry"]
|
|
CMD ["ci"]
|