diff options
author | Lewis Marshall <lewis@lmars.net> | 2017-06-01 18:52:18 +0800 |
---|---|---|
committer | Felix Lange <fjl@users.noreply.github.com> | 2017-06-01 18:52:18 +0800 |
commit | 0036e2a74761413200ce3a8ed316ecb721895f60 (patch) | |
tree | 1ac94ec2c89a9055999056cd6d99e2955c4409fd /swarm/dev/Dockerfile | |
parent | 727eadacca761e4abb4273a87dc601bb79d3167d (diff) | |
download | dexon-0036e2a74761413200ce3a8ed316ecb721895f60.tar dexon-0036e2a74761413200ce3a8ed316ecb721895f60.tar.gz dexon-0036e2a74761413200ce3a8ed316ecb721895f60.tar.bz2 dexon-0036e2a74761413200ce3a8ed316ecb721895f60.tar.lz dexon-0036e2a74761413200ce3a8ed316ecb721895f60.tar.xz dexon-0036e2a74761413200ce3a8ed316ecb721895f60.tar.zst dexon-0036e2a74761413200ce3a8ed316ecb721895f60.zip |
swarm/dev: add development environment (#14332)
This PR adds a Swarm development environment which can be run in a
Docker container and provides scripts for building binaries and running
Swarm clusters.
Diffstat (limited to 'swarm/dev/Dockerfile')
-rw-r--r-- | swarm/dev/Dockerfile | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/swarm/dev/Dockerfile b/swarm/dev/Dockerfile new file mode 100644 index 000000000..728bdab1f --- /dev/null +++ b/swarm/dev/Dockerfile @@ -0,0 +1,42 @@ +FROM ubuntu:xenial + +# install build + test dependencies +RUN apt-get update && \ + apt-get install --yes --no-install-recommends \ + ca-certificates \ + curl \ + fuse \ + g++ \ + gcc \ + git \ + iproute2 \ + iputils-ping \ + less \ + libc6-dev \ + make \ + pkg-config \ + && \ + apt-get clean + +# install Go +ENV GO_VERSION 1.8.1 +RUN curl -fSLo golang.tar.gz "https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz" && \ + tar -xzf golang.tar.gz -C /usr/local && \ + rm golang.tar.gz +ENV GOPATH /go +ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH + +# install docker CLI +RUN curl -fSLo docker.tar.gz https://get.docker.com/builds/Linux/x86_64/docker-17.04.0-ce.tgz && \ + tar -xzf docker.tar.gz -C /usr/local/bin --strip-components=1 docker/docker && \ + rm docker.tar.gz + +# install jq +RUN curl -fSLo /usr/local/bin/jq https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 && \ + chmod +x /usr/local/bin/jq + +# install govendor +RUN go get -u github.com/kardianos/govendor + +# add custom bashrc +ADD bashrc /root/.bashrc |