-
Notifications
You must be signed in to change notification settings - Fork 88
/
Copy pathDockerfile.dapper
32 lines (28 loc) · 1.62 KB
/
Dockerfile.dapper
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
ARG KUBECTL=rancher/kubectl:v1.31.1
FROM ${KUBECTL} AS kubectl
FROM registry.suse.com/bci/golang:1.23
COPY --from=kubectl /bin/kubectl /usr/local/bin/kubectl
ARG DAPPER_HOST_ARCH
ENV ARCH $DAPPER_HOST_ARCH
ARG SONOBUOY_VERSION=0.57.1
RUN zypper -n install expect git jq docker vim less file curl wget iproute2 gawk
RUN if [ "${ARCH:-$(go env GOARCH)}" = "amd64" ]; then \
curl -sL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.61.0; \
curl -sL "https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv5.4.3/kustomize_v5.4.3_linux_amd64.tar.gz" | tar -xz -C /usr/local/bin; \
curl -sL "https://github.com/vmware-tanzu/sonobuoy/releases/download/v${SONOBUOY_VERSION}/sonobuoy_${SONOBUOY_VERSION}_linux_${ARCH}.tar.gz" | tar -xz -C /usr/local/bin; \
curl -sL "https://github.com/docker/compose/releases/download/v2.29.1/docker-compose-linux-x86_64" -o /usr/local/bin/docker-compose && \
chmod +x /usr/local/bin/docker-compose; \
fi
RUN mkdir -p /usr/local/lib/docker/cli-plugins; \
curl -o /usr/local/lib/docker/cli-plugins/docker-buildx -fsSL "https://github.com/docker/buildx/releases/download/v0.17.1/buildx-v0.17.1.linux-amd64"; \
chmod +x /usr/local/lib/docker/cli-plugins/docker-buildx
ENV DAPPER_ENV REPO TAG DRONE_TAG
ENV DAPPER_SOURCE /go/src/github.com/rancher/system-upgrade-controller/
ENV DAPPER_OUTPUT ./bin ./dist
ENV DAPPER_DOCKER_SOCKET true
ENV DAPPER_RUN_ARGS "-v suc-pkg:/go/pkg -v suc-cache:/root/.cache/go-build"
ENV KUBECONFIG /root/.kube/config
ENV KUBEHOST 172.17.0.1
WORKDIR ${DAPPER_SOURCE}
ENTRYPOINT ["./scripts/entry"]
CMD ["ci"]