Skip to content

Optimize Docker image #66

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 19, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.git
docker-gen
dist
*.gz
15 changes: 13 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,20 @@ FROM debian:wheezy
MAINTAINER Jason Wilder <[email protected]>

ENV VERSION 0.3.7
ENV DOWNLOAD_URL https://github.com/jwilder/docker-gen/releases/download/$VERSION/docker-gen-linux-amd64-$VERSION.tar.gz
ENV DOCKER_HOST unix:///tmp/docker.sock

RUN apt-get update && apt-get install -y curl && curl -o docker-gen-linux-amd64-$VERSION.tar.gz -L https://github.com/jwilder/docker-gen/releases/download/$VERSION/docker-gen-linux-amd64-$VERSION.tar.gz && apt-get remove -y curl && apt-get -y clean
RUN tar -C /usr/local/bin -xvzf docker-gen-linux-amd64-$VERSION.tar.gz && rm docker-gen-linux-amd64-$VERSION.tar.gz
RUN deps=' \
curl ca-certificates \
'; \
set -x; \
apt-get update \
&& apt-get install -y --no-install-recommends $deps \
&& curl -o docker-gen.tar.gz -L $DOWNLOAD_URL \
&& tar -C /usr/local/bin -xvzf docker-gen.tar.gz \
&& rm docker-gen.tar.gz \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false $deps \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*

ENTRYPOINT ["/usr/local/bin/docker-gen"]