Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Commit

Permalink
ref(Dockerfile,README): rebase image on Ubuntu:16.04
Browse files Browse the repository at this point in the history
  • Loading branch information
mboersma committed May 3, 2018
1 parent 8676f8c commit 1a16fc1
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 53 deletions.
32 changes: 17 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,30 @@ creating [issues][] and submitting [pull requests][].

## Image Contents

* based on the [official go Docker image][]
* [dep][]: go dependency management tool
* [gb][]: project-based build tool for go
* [ginkgo][]: BDD testing framework for go
* [glide][]: go dependency management tool
* [golint][]: go source code linter
* [gox][]: simple go cross-compiling tool
* based on the [official Go Docker image][]
* [az][]: Azure cloud command-line tool
* [dep][]: Go dependency management tool
* [Docker][]: Docker binaries to be able to bind mount /var/run/docker.sock in the dev environment container
* [gb][]: project-based build tool for Go
* [ginkgo][]: BDD testing framework for Go
* [glide][]: Go dependency management tool
* [golint][]: Go source code linter
* [gometalinter][]: run Go lint tools concurrently
* [gox][]: simple Go cross-compiling tool
* [helm][]: Kubernetes package manager
* [jq][]: command-line JSON processor
* [jwt][]: tool for creating and parsing JSON Web Tokens
* [kubectl][]: Kubernetes command-line client
* [ruby][]: ruby scripting language
* [shellcheck][]: static analysis for shell scripts
* [shyaml][]: YAML access from the command line
* [test-cover.sh][]: test coverage for multiple go packages
* [test-cover.sh][]: test coverage for multiple Go packages
* [upx][]: executable packer
* [az][]: Azure cloud command-line tool
* [Docker][]: Docker binaries to be able to bind mount /var/run/docker.sock in the dev environment container
* [vim][]: text editor
* [ruby][]: ruby scripting language

## Usage

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

```console
Expand All @@ -59,25 +60,26 @@ The latest deis/go-dev Docker image is available at:
[Deis Workflow]: https://deis.com/
[dep]: https://github.com/golang/dep
[Docker Hub]: https://hub.docker.com
[Docker]: http://www.docker.com
[gb]: https://github.com/constabulary/gb/
[gen-changelog.sh]: https://github.com/deis/docker-go-dev/tree/master/rootfs/usr/local/bin/gen-changelog.sh
[ginkgo]: https://github.com/onsi/ginkgo
[glide]: https://github.com/Masterminds/glide
[Go]: https://golang.org/
[golint]: https://github.com/golang/lint
[gometalinter]: https://github.com/alecthomas/gometalinter
[gox]: https://github.com/mitchellh/gox
[helm]: https://github.com/kubernetes/helm
[issues]: https://github.com/deis/docker-go-dev/issues
[jq]: https://stedolan.github.io/jq/
[jwt]: https://github.com/dgrijalva/jwt-go
[kubectl]: https://kubernetes.io/docs/user-guide/kubectl-overview/
[official go Docker image]: https://hub.docker.com/_/golang/
[official Go Docker image]: https://hub.docker.com/_/golang/
[pull requests]: https://github.com/deis/docker-go-dev/pulls
[Quay.io]: https://quay.io
[ruby]: https://www.ruby-lang.org/
[shellcheck]: https://github.com/koalaman/shellcheck
[shyaml]: https://github.com/0k/shyaml
[test-cover.sh]: https://github.com/deis/docker-go-dev/tree/master/rootfs/usr/local/bin/test-cover.sh
[upx]: http://upx.sourceforge.net/
[Docker]: http://www.docker.com
[vim]: http://www.vim.org/
[ruby]: https://www.ruby-lang.org/
84 changes: 46 additions & 38 deletions rootfs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/deis/base:v0.3.6
FROM ubuntu:16.04

ENV AZCLI_VERSION=2.0.30 \
GO_VERSION=1.10.1 \
Expand All @@ -11,29 +11,39 @@ ENV AZCLI_VERSION=2.0.30 \
PATH=$PATH:/usr/local/go/bin:/go/bin:/usr/local/bin/docker \
GOPATH=/go

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
build-essential \
git-core \
mercurial \
util-linux \
jq \
libffi-dev \
libssl-dev \
man \
python \
python-dev \
python-pip \
python-setuptools \
unzip \
upx \
wget \
zip \
openssh-client \
rsync \
vim \
ruby \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/* \
# This is a huge one-liner to optimize the Docker image layer.
# We disable source repos to speed up apt-get update.
RUN \
sed -i -e 's/^deb-src/#deb-src/' /etc/apt/sources.list && \
export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get upgrade -y --no-install-recommends && \
apt-get install -y --no-install-recommends \
bash \
build-essential \
ca-certificates \
curl \
git-core \
jq \
libffi-dev \
libssl-dev \
man \
mercurial \
net-tools \
openssh-client \
procps \
python \
python-dev \
python-pip \
python-setuptools \
rsync \
ruby \
unzip \
upx \
util-linux \
vim \
wget \
zip \
&& curl -L https://storage.googleapis.com/golang/go$GO_VERSION.linux-amd64.tar.gz | tar -C /usr/local -xz \
&& curl -sSL https://github.com/Masterminds/glide/releases/download/$GLIDE_VERSION/glide-$GLIDE_VERSION-linux-amd64.tar.gz \
| tar -vxz -C /usr/local/bin --strip=1 \
Expand All @@ -50,30 +60,28 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
| tar -vxz -C /usr/local/bin --strip=1 \
&& mkdir -p /go/bin \
&& curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh \
&& apt-get purge -y --auto-remove \
unzip \
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/man /usr/share/doc \
&& curl -fsSLO https://get.docker.com/builds/Linux/x86_64/docker-17.05.0-ce.tgz \
&& tar xzvf docker-17.05.0-ce.tgz -C /usr/local/bin \
&& chmod +x -R /usr/local/bin/docker \
&& rm docker-17.05.0-ce.tgz \
&& go get -u -v \
github.com/onsi/ginkgo/ginkgo \
github.com/mitchellh/gox \
github.com/golang/protobuf/protoc-gen-go \
github.com/haya14busa/goverage \
github.com/constabulary/gb/... \
github.com/dgrijalva/jwt-go/cmd/jwt \
github.com/axw/gocov/gocov \
github.com/AlekSi/gocov-xml \
github.com/AlekSi/gocov-xml \
github.com/axw/gocov/gocov \
github.com/constabulary/gb/... \
github.com/dgrijalva/jwt-go/cmd/jwt \
github.com/golang/protobuf/protoc-gen-go \
github.com/haya14busa/goverage \
github.com/mitchellh/gox \
github.com/onsi/ginkgo/ginkgo \
&& curl -fsSLO https://github.com/alecthomas/gometalinter/releases/download/v${GOMETALINTER_VERSION}/gometalinter-${GOMETALINTER_VERSION}-linux-amd64.tar.gz \
&& tar xzvf gometalinter-${GOMETALINTER_VERSION}-linux-amd64.tar.gz --strip-components=1 -C /usr/local/bin \
&& ln -s /usr/local/bin/gometalinter /usr/local/bin/gometalinter.v2 \
&& rm gometalinter-${GOMETALINTER_VERSION}-linux-amd64.tar.gz \
&& pip install --disable-pip-version-check --no-cache-dir azure-cli==${AZCLI_VERSION} shyaml \
&& apt-get purge --auto-remove -y libffi-dev python-dev python-pip
&& apt-get purge --auto-remove -y libffi-dev python-dev python-pip unzip \
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/man /usr/share/doc

WORKDIR /go

Expand Down

0 comments on commit 1a16fc1

Please sign in to comment.