aboutsummaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorYi Kong <yikong@google.com>2022-11-19 01:47:19 +0900
committerYi Kong <yikong@google.com>2022-11-19 01:47:19 +0900
commitcad05180b97e28aa85a288d4db974aaee3397c02 (patch)
treedee14649cbe220a0de03412a3aea9ee82139e9d8 /docker
parentba49eb7fc285a4dd391d1dce0e92541e7452a72c (diff)
downloadllvm_android-cad05180b97e28aa85a288d4db974aaee3397c02.tar.gz
Run apt-get update and apt-get install in the same step
Docker caches intermediate build steps. The cache of "apt-get update" might be outdated, the subsequent "apt-get install" may fail because it can't find the files from the outdated catalogue. also do not run apt-get ugprade, as recommended by Docker Best Practices. Test: N/A Change-Id: Ie6c7c4da7a3e594af302e7405faee268b570296a
Diffstat (limited to 'docker')
-rw-r--r--docker/Dockerfile10
1 files changed, 4 insertions, 6 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 5027811..7b85345 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -1,17 +1,15 @@
FROM ubuntu:22.04
-ENV DEBIAN_FRONTEND=noninteractive
-RUN apt-get update
-RUN apt-get upgrade
-RUN apt-get install -y \
+RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
bison \
build-essential \
cargo \
git \
python3 \
- rsync
+ rsync \
+ libssl-dev \
+ pkg-config
# Install sccache
-RUN apt-get install -y libssl-dev pkg-config
RUN cargo install --root /usr/local --no-default-features --features=gcs sccache
# Clean up temp files