-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile.dapper
55 lines (41 loc) · 1.4 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
FROM debian:stable-slim
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
curl \
gccgo \
git
########## Dapper Configuration #####################
ENV DAPPER_DOCKER_SOCKET true
ENV DAPPER_SOURCE /go/src/github.com/kassisol/docker-volume-nfs
ENV DAPPER_OUTPUT ./bin ./dist
ENV SHELL /bin/bash
WORKDIR ${DAPPER_SOURCE}
########## General Configuration #####################
ARG DAPPER_HOST_ARCH=amd64
ARG HOST_ARCH=${DAPPER_HOST_ARCH}
ARG ARCH=${HOST_ARCH}
ARG APP_REPO=kassisol
ARG DOCKER_VERSION=17.05.0-ce
ARG DOCKER_URL_amd64=https://get.docker.com/builds/Linux/x86_64/docker-${DOCKER_VERSION}.tgz
# Set up environment and export all ARGS as ENV
ENV ARCH=${ARCH} \
HOST_ARCH=${HOST_ARCH}
ENV DOCKER_URL=${DOCKER_URL_amd64} \
DAPPER_HOST_ARCH=${DAPPER_HOST_ARCH} \
GOPATH=/go \
GOARCH=$ARCH \
GO_VERSION=1.8.3
ENV PATH=/go/bin:/usr/local/go/bin:$PATH
# Install Go
RUN curl -sfL https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz | tar -xzC /usr/local
# Install Host Docker
RUN curl -sfL ${DOCKER_URL} | tar -xzC /usr/local/src \
&& cp /usr/local/src/docker/docker /usr/bin/docker \
&& chmod +x /usr/bin/docker
# Install dapper
RUN curl -sL https://releases.rancher.com/dapper/latest/dapper-`uname -s`-`uname -m | sed 's/arm.*/arm/'` > /usr/bin/dapper \
&& chmod +x /usr/bin/dapper
ENTRYPOINT ["./scripts/entry"]
CMD ["ci"]