forked from cnrancher/go-zstack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.dapper
34 lines (25 loc) · 1.44 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
33
34
FROM ubuntu:16.04
# FROM arm=armhf/ubuntu:16.04
ARG DAPPER_HOST_ARCH
ENV HOST_ARCH=${DAPPER_HOST_ARCH} ARCH=${DAPPER_HOST_ARCH}
#ADD sources.list /etc/apt/sources.list
RUN apt-get update && \
apt-get install -y gcc ca-certificates git wget curl vim less file && \
rm -f /bin/sh && ln -s /bin/bash /bin/sh && \
wget -O - http://dev-tool.oss-cn-shenzhen.aliyuncs.com/git/tools.tar.gz > /tmp/tools.tar.gz
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 - http://dev-tool.oss-cn-shenzhen.aliyuncs.com/golang/go1.7.4.linux-${!GOLANG_ARCH}.tar.gz | tar -xzf - -C /usr/local && \
go get github.com/rancher/trash && mkdir -p ${GOPATH}/src/golang.org/x/tools && cd ${GOPATH}/src/golang.org/x && tar -xzvf /tmp/tools.tar.gz && go get github.com/golang/lint/golint
ENV DOCKER_URL_amd64=http://dev-tool.oss-cn-shenzhen.aliyuncs.com/docker/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
ENV DAPPER_SOURCE /go/src/github.com/cnrancher/go-zstack/
ENV DAPPER_OUTPUT ./bin ./dist
ENV DAPPER_DOCKER_SOCKET true
ENV TRASH_CACHE ${DAPPER_SOURCE}/.trash-cache
ENV HOME ${DAPPER_SOURCE}
WORKDIR ${DAPPER_SOURCE}
ENTRYPOINT ["./scripts/entry"]
CMD ["ci"]