Skip to content

Commit 1a16fc1

Browse files
committed
ref(Dockerfile,README): rebase image on Ubuntu:16.04
1 parent 8676f8c commit 1a16fc1

2 files changed

Lines changed: 63 additions & 53 deletions

File tree

README.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,30 @@ creating [issues][] and submitting [pull requests][].
1010

1111
## Image Contents
1212

13-
* based on the [official go Docker image][]
14-
* [dep][]: go dependency management tool
15-
* [gb][]: project-based build tool for go
16-
* [ginkgo][]: BDD testing framework for go
17-
* [glide][]: go dependency management tool
18-
* [golint][]: go source code linter
19-
* [gox][]: simple go cross-compiling tool
13+
* based on the [official Go Docker image][]
14+
* [az][]: Azure cloud command-line tool
15+
* [dep][]: Go dependency management tool
16+
* [Docker][]: Docker binaries to be able to bind mount /var/run/docker.sock in the dev environment container
17+
* [gb][]: project-based build tool for Go
18+
* [ginkgo][]: BDD testing framework for Go
19+
* [glide][]: Go dependency management tool
20+
* [golint][]: Go source code linter
21+
* [gometalinter][]: run Go lint tools concurrently
22+
* [gox][]: simple Go cross-compiling tool
2023
* [helm][]: Kubernetes package manager
2124
* [jq][]: command-line JSON processor
2225
* [jwt][]: tool for creating and parsing JSON Web Tokens
2326
* [kubectl][]: Kubernetes command-line client
27+
* [ruby][]: ruby scripting language
2428
* [shellcheck][]: static analysis for shell scripts
2529
* [shyaml][]: YAML access from the command line
26-
* [test-cover.sh][]: test coverage for multiple go packages
30+
* [test-cover.sh][]: test coverage for multiple Go packages
2731
* [upx][]: executable packer
28-
* [az][]: Azure cloud command-line tool
29-
* [Docker][]: Docker binaries to be able to bind mount /var/run/docker.sock in the dev environment container
3032
* [vim][]: text editor
31-
* [ruby][]: ruby scripting language
3233

3334
## Usage
3435

35-
Mount your local go code into a container's `$GOPATH` to run any `go` command or one of the
36+
Mount your local Go code into a container's `$GOPATH` to run any `go` command or one of the
3637
included tools or scripts. Here's an example of running `glide up` for deis/builder:
3738

3839
```console
@@ -59,25 +60,26 @@ The latest deis/go-dev Docker image is available at:
5960
[Deis Workflow]: https://deis.com/
6061
[dep]: https://github.com/golang/dep
6162
[Docker Hub]: https://hub.docker.com
63+
[Docker]: http://www.docker.com
6264
[gb]: https://github.com/constabulary/gb/
6365
[gen-changelog.sh]: https://github.com/deis/docker-go-dev/tree/master/rootfs/usr/local/bin/gen-changelog.sh
6466
[ginkgo]: https://github.com/onsi/ginkgo
6567
[glide]: https://github.com/Masterminds/glide
6668
[Go]: https://golang.org/
6769
[golint]: https://github.com/golang/lint
70+
[gometalinter]: https://github.com/alecthomas/gometalinter
6871
[gox]: https://github.com/mitchellh/gox
6972
[helm]: https://github.com/kubernetes/helm
7073
[issues]: https://github.com/deis/docker-go-dev/issues
7174
[jq]: https://stedolan.github.io/jq/
7275
[jwt]: https://github.com/dgrijalva/jwt-go
7376
[kubectl]: https://kubernetes.io/docs/user-guide/kubectl-overview/
74-
[official go Docker image]: https://hub.docker.com/_/golang/
77+
[official Go Docker image]: https://hub.docker.com/_/golang/
7578
[pull requests]: https://github.com/deis/docker-go-dev/pulls
7679
[Quay.io]: https://quay.io
80+
[ruby]: https://www.ruby-lang.org/
7781
[shellcheck]: https://github.com/koalaman/shellcheck
7882
[shyaml]: https://github.com/0k/shyaml
7983
[test-cover.sh]: https://github.com/deis/docker-go-dev/tree/master/rootfs/usr/local/bin/test-cover.sh
8084
[upx]: http://upx.sourceforge.net/
81-
[Docker]: http://www.docker.com
8285
[vim]: http://www.vim.org/
83-
[ruby]: https://www.ruby-lang.org/

rootfs/Dockerfile

Lines changed: 46 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM quay.io/deis/base:v0.3.6
1+
FROM ubuntu:16.04
22

33
ENV AZCLI_VERSION=2.0.30 \
44
GO_VERSION=1.10.1 \
@@ -11,29 +11,39 @@ ENV AZCLI_VERSION=2.0.30 \
1111
PATH=$PATH:/usr/local/go/bin:/go/bin:/usr/local/bin/docker \
1212
GOPATH=/go
1313

14-
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
15-
build-essential \
16-
git-core \
17-
mercurial \
18-
util-linux \
19-
jq \
20-
libffi-dev \
21-
libssl-dev \
22-
man \
23-
python \
24-
python-dev \
25-
python-pip \
26-
python-setuptools \
27-
unzip \
28-
upx \
29-
wget \
30-
zip \
31-
openssh-client \
32-
rsync \
33-
vim \
34-
ruby \
35-
--no-install-recommends \
36-
&& rm -rf /var/lib/apt/lists/* \
14+
# This is a huge one-liner to optimize the Docker image layer.
15+
# We disable source repos to speed up apt-get update.
16+
RUN \
17+
sed -i -e 's/^deb-src/#deb-src/' /etc/apt/sources.list && \
18+
export DEBIAN_FRONTEND=noninteractive && \
19+
apt-get update && \
20+
apt-get upgrade -y --no-install-recommends && \
21+
apt-get install -y --no-install-recommends \
22+
bash \
23+
build-essential \
24+
ca-certificates \
25+
curl \
26+
git-core \
27+
jq \
28+
libffi-dev \
29+
libssl-dev \
30+
man \
31+
mercurial \
32+
net-tools \
33+
openssh-client \
34+
procps \
35+
python \
36+
python-dev \
37+
python-pip \
38+
python-setuptools \
39+
rsync \
40+
ruby \
41+
unzip \
42+
upx \
43+
util-linux \
44+
vim \
45+
wget \
46+
zip \
3747
&& curl -L https://storage.googleapis.com/golang/go$GO_VERSION.linux-amd64.tar.gz | tar -C /usr/local -xz \
3848
&& curl -sSL https://github.com/Masterminds/glide/releases/download/$GLIDE_VERSION/glide-$GLIDE_VERSION-linux-amd64.tar.gz \
3949
| tar -vxz -C /usr/local/bin --strip=1 \
@@ -50,30 +60,28 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
5060
| tar -vxz -C /usr/local/bin --strip=1 \
5161
&& mkdir -p /go/bin \
5262
&& curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh \
53-
&& apt-get purge -y --auto-remove \
54-
unzip \
55-
&& apt-get autoremove -y \
56-
&& apt-get clean -y \
57-
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/man /usr/share/doc \
5863
&& curl -fsSLO https://get.docker.com/builds/Linux/x86_64/docker-17.05.0-ce.tgz \
5964
&& tar xzvf docker-17.05.0-ce.tgz -C /usr/local/bin \
6065
&& chmod +x -R /usr/local/bin/docker \
6166
&& rm docker-17.05.0-ce.tgz \
6267
&& go get -u -v \
63-
github.com/onsi/ginkgo/ginkgo \
64-
github.com/mitchellh/gox \
65-
github.com/golang/protobuf/protoc-gen-go \
66-
github.com/haya14busa/goverage \
67-
github.com/constabulary/gb/... \
68-
github.com/dgrijalva/jwt-go/cmd/jwt \
69-
github.com/axw/gocov/gocov \
70-
github.com/AlekSi/gocov-xml \
68+
github.com/AlekSi/gocov-xml \
69+
github.com/axw/gocov/gocov \
70+
github.com/constabulary/gb/... \
71+
github.com/dgrijalva/jwt-go/cmd/jwt \
72+
github.com/golang/protobuf/protoc-gen-go \
73+
github.com/haya14busa/goverage \
74+
github.com/mitchellh/gox \
75+
github.com/onsi/ginkgo/ginkgo \
7176
&& curl -fsSLO https://github.com/alecthomas/gometalinter/releases/download/v${GOMETALINTER_VERSION}/gometalinter-${GOMETALINTER_VERSION}-linux-amd64.tar.gz \
7277
&& tar xzvf gometalinter-${GOMETALINTER_VERSION}-linux-amd64.tar.gz --strip-components=1 -C /usr/local/bin \
7378
&& ln -s /usr/local/bin/gometalinter /usr/local/bin/gometalinter.v2 \
7479
&& rm gometalinter-${GOMETALINTER_VERSION}-linux-amd64.tar.gz \
7580
&& pip install --disable-pip-version-check --no-cache-dir azure-cli==${AZCLI_VERSION} shyaml \
76-
&& apt-get purge --auto-remove -y libffi-dev python-dev python-pip
81+
&& apt-get purge --auto-remove -y libffi-dev python-dev python-pip unzip \
82+
&& apt-get autoremove -y \
83+
&& apt-get clean -y \
84+
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/man /usr/share/doc
7785

7886
WORKDIR /go
7987

0 commit comments

Comments
 (0)