-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile.dev
71 lines (55 loc) · 1.77 KB
/
Dockerfile.dev
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
FROM debian:stable-slim
COPY scripts/dev/go.sh /etc/profile.d/go.sh
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
curl \
gccgo \
git \
iproute2 \
iptables \
iputils-ping \
less \
procps \
telnet \
vim \
wget \
&& mkdir /root/.ssh
########## Dapper Configuration #####################
ENV DAPPER_RUN_ARGS --privileged --name docker-volume-nfs_dev
ENV DAPPER_SOURCE /go/src/github.com/kassisol/docker-volume-nfs
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.09.0
ARG DOCKER_URL_amd64=https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}-ce.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 Docker
RUN curl -sfL ${DOCKER_URL} | tar -xzC /usr/local/src \
&& cp /usr/local/src/docker/docker* /usr/bin/
# Install Go
RUN curl -sfL https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz | tar -xzC /usr/local
# Install govendor
RUN go get -u github.com/kardianos/govendor
# Install Golint
RUN go get -u github.com/golang/lint/golint
# Install dotfiles
RUN git clone https://github.com/juliengk/dot-files /root/Dotfiles \
&& mkdir /root/bin \
&& wget https://raw.githubusercontent.com/juliengk/dotfiles/master/misc/get-dotfiles.sh -O /root/bin/get-dotfiles.sh \
&& chmod +x /root/bin/get-dotfiles.sh \
&& /root/bin/get-dotfiles.sh \
&& /root/bin/dotfiles -sync -force