Skip to content
This repository has been archived by the owner on May 28, 2019. It is now read-only.

Commit

Permalink
[docker] Combine apt-get update with apt-get install.
Browse files Browse the repository at this point in the history
Running RUN apt-get update by itself will cause it to use the cache when
rebuilding the dockerfile. This can lead to apt-get installs failing
when updating programs. The preferred method is RUN apt-get update &&
apt-get install -y <any apt-get installs you need>. this will force
apt-get update to run when any package is updated, or new ones are
installed.

moby/moby#3313
  • Loading branch information
Faeranne authored and glogiotatidis committed Oct 6, 2014
1 parent 310cb6d commit 916b86c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
@@ -1,17 +1,17 @@
FROM python:2.7
ADD . /code
WORKDIR /code
RUN apt-get update

# update apt-get and install packages
RUN apt-get update && apt-get install -y locales nodejs npm

# Generate locales
RUN apt-get install -y locales
RUN echo "en_US.UTF8 UTF-8" > /etc/locale.gen
RUN locale-gen

# Node dependencies
RUN apt-get install -y nodejs npm
RUN npm install -g less

RUN pip install -r build-requirements.txt
RUN ln -s /usr/bin/nodejs /usr/bin/node
RUN peep install -r requirements/dev.txt
RUN peep install -r requirements/dev.txt

0 comments on commit 916b86c

Please sign in to comment.