1
0
mirror of https://github.com/rancher/types.git synced 2025-07-03 08:46:13 +00:00
types/Dockerfile.dapper

39 lines
1.5 KiB
Docker
Raw Normal View History

2019-02-27 19:33:56 +00:00
FROM ubuntu:16.04
# FROM arm=armhf/ubuntu:16.04
ARG DAPPER_HOST_ARCH
ENV HOST_ARCH=${DAPPER_HOST_ARCH} ARCH=${DAPPER_HOST_ARCH}
RUN apt-get update && \
apt-get install -y gcc ca-certificates git wget curl vim less file kmod iptables xz-utils zip && \
rm -f /bin/sh && ln -s /bin/bash /bin/sh
ENV GOLANG_ARCH_amd64=amd64 GOLANG_ARCH_arm=armv6l GOLANG_ARCH=GOLANG_ARCH_${ARCH} \
GOPATH=/go PATH=/go/bin:/usr/local/go/bin:${PATH} SHELL=/bin/bash
RUN wget -O - https://storage.googleapis.com/golang/go1.11.linux-${!GOLANG_ARCH}.tar.gz | tar -xzf - -C /usr/local && \
go get github.com/rancher/trash && go get golang.org/x/lint/golint
2019-02-27 19:42:35 +00:00
RUN go get -d golang.org/x/tools/cmd/goimports && \
git -C /go/src/golang.org/x/tools/cmd/goimports checkout -b current 0b24b358f4c7eaa92895f67a3f6cea2a0cf525d5 && \
go install golang.org/x/tools/cmd/goimports && \
rm -rf /go/src /go/pkg
2019-02-27 19:33:56 +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=DOCKER_URL_${ARCH}
RUN wget -O - ${!DOCKER_URL} > /usr/bin/docker && chmod +x /usr/bin/docker
2017-11-10 20:23:15 +00:00
ENV DAPPER_SOURCE /go/src/github.com/rancher/types/
2019-02-27 19:33:56 +00:00
ENV DAPPER_RUN_ARGS --privileged -v /var/lib/docker
ENV DAPPER_OUTPUT ./bin ./dist ./build/bin
2017-11-10 20:23:15 +00:00
ENV DAPPER_DOCKER_SOCKET true
2019-02-27 19:33:56 +00:00
ENV DAPPER_ENV TAG REPO GOOS CROSS DRONE_TAG
ENV TRASH_CACHE ${DAPPER_SOURCE}/.trash-cache
2017-11-10 20:23:15 +00:00
ENV HOME ${DAPPER_SOURCE}
WORKDIR ${DAPPER_SOURCE}
ENTRYPOINT ["./scripts/entry"]
CMD ["ci"]