aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Leon Sandøy <[email protected]>2020-08-22 02:03:19 +0200
committerGravatar Leon Sandøy <[email protected]>2020-08-22 02:03:19 +0200
commit09538085645d623b8cb685c602b3a4e524b6408f (patch)
tree4c59d592ea725f3fc195e1a04c5feb2099e3247e
parentAdd a comment with the git SHA to base templates. (diff)
Optimize the git install in Dockerfile.
-rw-r--r--docker/Dockerfile10
1 files changed, 7 insertions, 3 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index d9da7d14..d3d0319d 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -9,9 +9,13 @@ ENV PIP_NO_CACHE_DIR=false \
PIPENV_NOSPIN=1
# Install git
-RUN apt-get update && \
- apt-get upgrade -y && \
- apt-get install -y git
+RUN apt-get update
+RUN apt-get install -y git
+
+RUN apt-get -y update \
+ && apt-get install -y \
+ git \
+ && rm -rf /var/lib/apt/lists/*
# Create non-root user.
RUN useradd --system --shell /bin/false --uid 1500 pysite