30 lines
1.1 KiB
Docker
30 lines
1.1 KiB
Docker
FROM registry.suse.com/bci/golang:1.24
|
|
|
|
ARG DAPPER_HOST_ARCH
|
|
ENV ARCH $DAPPER_HOST_ARCH
|
|
|
|
# -- for make rules
|
|
## install docker client
|
|
RUN zypper -n install ca-certificates awk lsb-release rsync docker containerd
|
|
|
|
# Install golangci-lint
|
|
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "$(go env GOPATH)/bin" latest
|
|
|
|
# The docker version in dapper is too old to have buildx. Install it manually.
|
|
RUN curl -sSfL https://github.com/docker/buildx/releases/download/v0.14.1/buildx-v0.14.1.linux-${ARCH} -o buildx-v0.14.1.linux-${ARCH} && \
|
|
chmod +x buildx-v0.14.1.linux-${ARCH} && \
|
|
mv buildx-v0.14.1.linux-${ARCH} /usr/local/bin/buildx
|
|
|
|
# -- for dapper
|
|
ENV DAPPER_RUN_ARGS --privileged --network host -v /run/containerd/containerd.sock:/run/containerd/containerd.sock
|
|
ENV GO111MODULE off
|
|
ENV DAPPER_ENV REPO TAG DRONE_TAG
|
|
ENV DAPPER_DOCKER_SOCKET true
|
|
ENV DAPPER_SOURCE /go/src/github.com/rancher/support-bundle-kit/
|
|
ENV DAPPER_OUTPUT ./bin ./dist
|
|
# -- for dapper
|
|
|
|
WORKDIR ${DAPPER_SOURCE}
|
|
ENTRYPOINT ["./scripts/entry"]
|
|
CMD ["ci"]
|