Skip to content

Commit 24177e8

Browse files
committed
Better Dockerfiles for smaller containers
Cleanup apt after we use it for smaller container size. I also reordered some of the commands to put the things that change more often nearer the bottom allowing us to build newer containers faster. Use newer Ubuntu for newer openssh (no real reason other than newer is better?). These Dockerfiles were used to produce the 1.2.0 containers on dockerhub.
1 parent 244d0fa commit 24177e8

2 files changed

Lines changed: 11 additions & 9 deletions

File tree

Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
FROM ubuntu:14.04
1+
FROM ubuntu:15.10
22
MAINTAINER Bob Van Zant <bob@veznat.com>
33
LABEL Description="ssh-cert-authority"
4+
RUN apt-get update && apt-get install -y openssh-client && apt-get clean && rm -rf /var/lib/apt
45
COPY ssh-cert-authority-linux-amd64.gz /usr/local/bin/ssh-cert-authority.gz
56
RUN gunzip /usr/local/bin/ssh-cert-authority.gz
67
RUN chmod +x /usr/local/bin/ssh-cert-authority
7-
RUN apt-get update
8-
RUN apt-get install -y openssh-client
98
ENTRYPOINT ["ssh-agent", "/usr/local/bin/ssh-cert-authority", "runserver"]

Dockerfile-buildenv

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1-
FROM ubuntu:14.04
1+
FROM ubuntu:15.10
22
MAINTAINER Bob Van Zant <bob@veznat.com>
33
LABEL Description="up-to-date ubuntu environment" Vendor="Cloudtools"
44

5-
RUN apt-get update && apt-get install -y \
6-
build-essential \
7-
curl \
8-
git-core \
9-
golang
5+
RUN apt-get update && \
6+
apt-get install -y \
7+
build-essential \
8+
curl \
9+
git-core \
10+
golang && \
11+
apt-get clean && \
12+
rm -rf /var/lib/apt
1013

1114
LABEL Description="up-to-date golang environment"
1215

0 commit comments

Comments
 (0)