1
0
mirror of https://github.com/rancher/rke.git synced 2025-04-27 19:25:44 +00:00
rke/Dockerfile.dapper

35 lines
1.4 KiB
Docker
Raw Normal View History

2020-07-15 09:12:47 +00:00
FROM ubuntu:20.04
# FROM arm=armhf/ubuntu:20.04 arm64=arm64v8/ubuntu:20.04
2017-10-26 00:02:49 +00:00
ARG DAPPER_HOST_ARCH
ENV HOST_ARCH=${DAPPER_HOST_ARCH} ARCH=${DAPPER_HOST_ARCH}
RUN apt-get update && \
2018-09-18 20:11:18 +00:00
apt-get install -y gcc ca-certificates git wget curl vim less file kmod iptables xz-utils zip && \
2017-10-26 00:02:49 +00:00
rm -f /bin/sh && ln -s /bin/bash /bin/sh
ENV GOLANG_ARCH_amd64=amd64 GOLANG_ARCH_arm=armv6l GOLANG_ARCH_arm64=arm64 GOLANG_ARCH=GOLANG_ARCH_${ARCH} \
2017-10-26 00:02:49 +00:00
GOPATH=/go PATH=/go/bin:/usr/local/go/bin:${PATH} SHELL=/bin/bash
2019-12-09 18:42:21 +00:00
RUN wget -O - https://storage.googleapis.com/golang/go1.13.4.linux-${!GOLANG_ARCH}.tar.gz | tar -xzf - -C /usr/local && \
2018-10-16 00:47:10 +00:00
go get github.com/rancher/trash && go get golang.org/x/lint/golint
2017-10-26 00:02:49 +00:00
ENV DOCKER_URL_amd64=https://get.docker.com/builds/Linux/x86_64/docker-1.10.3 \
DOCKER_URL_arm=https://github.com/rancher/docker/releases/download/v1.10.3-ros1/docker-1.10.3_arm \
DOCKER_URL_arm64=https://github.com/rancher/docker/releases/download/v1.10.3-ros1/docker-1.10.3_arm64 \
2017-10-26 00:02:49 +00:00
DOCKER_URL=DOCKER_URL_${ARCH}
RUN wget -O - ${!DOCKER_URL} > /usr/bin/docker && chmod +x /usr/bin/docker
ENV DAPPER_SOURCE /go/src/github.com/rancher/rke/
ENV DAPPER_RUN_ARGS --privileged -v /var/lib/docker
2017-11-15 18:53:17 +00:00
ENV DAPPER_OUTPUT ./bin ./dist ./build/bin
2017-10-26 00:02:49 +00:00
ENV DAPPER_DOCKER_SOCKET true
ENV DAPPER_ENV TAG REPO GOOS CROSS DRONE_TAG
2017-10-26 00:02:49 +00:00
ENV TRASH_CACHE ${DAPPER_SOURCE}/.trash-cache
ENV HOME ${DAPPER_SOURCE}
WORKDIR ${DAPPER_SOURCE}
ENTRYPOINT ["./scripts/entry"]
CMD ["ci"]