Skip to content

Commit 8bb79b4

Browse files
amanoharmatucker-msft
authored andcommitted
feat(DockerFile): Install Docker in the image (#76)
* Install Docker in the container image * Update ReadMe and pin to a Docker version * Extract Docker binaries from tar file and set path * Fix typo * Update target directory to extract binaries in and upate executable permissions
1 parent b34279e commit 8bb79b4

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ creating [issues][] and submitting [pull requests][].
1919
* [shellcheck][]: static analysis for shell scripts
2020
* [test-cover.sh][]: test coverage for multiple go packages
2121
* [upx][]: executable packer
22+
* [Docker][]: Docker binaries to be able to bind mount /var/run/docker.sock in the dev environment container
2223

2324
## Usage
2425

@@ -61,3 +62,4 @@ The latest deis/go-dev Docker image is available at:
6162
[shellcheck]: https://github.com/koalaman/shellcheck
6263
[test-cover.sh]: https://github.com/deis/docker-go-dev/tree/master/rootfs/usr/local/bin/test-cover.sh
6364
[upx]: http://upx.sourceforge.net/
65+
[Docker]: http://www.docker.com

rootfs/Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ENV GO_VERSION=1.8.3 \
44
GLIDE_VERSION=v0.12.3 \
55
GLIDE_HOME=/root \
66
SHELLCHECK_VERSION=v0.4.6 \
7-
PATH=$PATH:/usr/local/go/bin:/go/bin \
7+
PATH=$PATH:/usr/local/go/bin:/go/bin:/usr/local/bin/docker \
88
GOPATH=/go
99

1010
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
@@ -34,6 +34,10 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
3434
&& apt-get autoremove -y \
3535
&& apt-get clean -y \
3636
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/man /usr/share/doc \
37+
&& curl -fsSLO https://get.docker.com/builds/Linux/x86_64/docker-17.05.0-ce.tgz \
38+
&& tar xzvf docker-17.05.0-ce.tgz -C /usr/local/bin \
39+
&& chmod +x -R /usr/local/bin/docker \
40+
&& rm docker-17.05.0-ce.tgz \
3741
&& go get -u -v \
3842
github.com/alecthomas/gometalinter \
3943
github.com/onsi/ginkgo/ginkgo \

0 commit comments

Comments
 (0)