Skip to content

Commit a9b7c46

Browse files
committed
fix(Dockerfile): ensure apt-get install is prefixed by update
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.
1 parent 0131b84 commit a9b7c46

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

Dockerfile

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,14 @@ FROM deis/base:latest
22
MAINTAINER OpDemand <info@opdemand.com>
33

44
# install required system packages
5+
# HACK: install git so we can install bacongobbler's fork of django-fsm
6+
# install openssh-client for temporary fleetctl wrapper
57
RUN apt-get update && \
6-
apt-get install -yq python-dev libpq-dev libyaml-dev
8+
apt-get install -yq python-dev libpq-dev libyaml-dev git openssh-client
79

810
# install recent pip
911
RUN wget -qO- https://raw.githubusercontent.com/pypa/pip/1.5.5/contrib/get-pip.py | python -
1012

11-
# HACK: install git so we can install bacongobbler's fork of django-fsm
12-
RUN apt-get install -yq git
13-
14-
# install openssh-client for temporary fleetctl wrapper
15-
RUN apt-get install -yq openssh-client
16-
1713
# add a deis user that has passwordless sudo (for now)
1814
RUN useradd deis --groups sudo --home-dir /app --shell /bin/bash
1915
RUN sed -i -e 's/%sudo\tALL=(ALL:ALL) ALL/%sudo\tALL=(ALL:ALL) NOPASSWD:ALL/' /etc/sudoers

0 commit comments

Comments
 (0)