-
Notifications
You must be signed in to change notification settings - Fork 799
fix(Dockerfile): ensure apt-get install
is prefixed by update
#1249
Conversation
For reference, deis/base installs: make ca-certificates net-tools sudo wget vim strace lsof netcat |
@mboersma It looks like we should combine |
RUN echo "deb http://get.docker.io/ubuntu docker main" > /etc/apt/sources.list.d/docker.list | ||
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 | ||
RUN apt-get update -qy | ||
RUN apt-get install -yq lxc-docker-1.0.0 | ||
RUN apt-get update && apt-get install -yq lxc-docker-1.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason we can't move this up into the main install block? I'd prefer to avoid two updates if we can help it. We can add the Docker repository, then do an update and install all packages in one fell swoop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, good catch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
I also updated the Go install in logger to 1.2.2, because 1.2.1 was no longer available at the speedy Docker-Index-friendly URL. |
Code LGTM. |
Since Dockerfile layers are cached, having `apt-get update` as a separate command creates the potential for a subsequent `apt-get install` to fail. Best practices (other than "install from source") seem to be to make both commands into a one-liner. This PR ensures we don't `apt-get install` as its own command anywhere, removes the installation of some packages that were already in deis/base, and removes a redundant ENV DEBIAN_FRONTEND statement.
Jenkins, test this please. |
fix(Dockerfile): ensure `apt-get install` is prefixed by `update`
Since Dockerfile layers are cached, having
apt-get update
as a separatecommand creates the potential for a subsequent
apt-get install
to fail.Best practices (other than "install from source") seem to be to make
both commands into a one-liner.
This PR ensures we don't
apt-get install
as its own command anywhere,removes the installation of some packages that were already in deis/base,
and removes a redundant ENV DEBIAN_FRONTEND statement.
See also #1246 for discussion.