Commit 39b7e8b0 by Patrick Steinhardt

docker: convert apt-get to use best practices

Reformat both Xenial and Bionic's Dockerfiles to use best practices.
Most importantly, we now run `apt-get update` and `apt-get install` in
one step followed up by removing the package lists to speed up
installation and keep down the image size.
parent 9f91d57e
ARG BASE
FROM $BASE
ARG CACHEBUST=1
RUN apt-get update
RUN apt-get -y install pkgconf clang git cmake curl libssl-dev libcurl4 libcurl4-openssl-dev libssh2-1-dev libz-dev valgrind openssh-client openssh-server
RUN if [ "$ARCH" != "armhf" -a "$ARCH" != "arm64" ]; then apt-get -y install openjdk-11-jre-headless; fi
RUN apt-get update && \
apt-get install -y \
clang \
cmake \
curl \
git \
libcurl4 \
libcurl4-openssl-dev \
libssh2-1-dev \
libssl-dev \
libz-dev \
openjdk-11-jre-headless \
openssh-client \
openssh-server \
pkgconf \
valgrind \
&& \
rm -rf /var/lib/apt/lists/*
RUN mkdir /var/run/sshd
RUN cd /tmp && \
......
ARG BASE
FROM $BASE
ARG CACHEBUST=1
RUN apt-get update
RUN apt-get -y install pkgconf clang git cmake curl libssl-dev libcurl3 libcurl3-gnutls libcurl4-gnutls-dev valgrind openssh-client openssh-server openjdk-8-jre
RUN apt-get update && \
apt-get install -y \
clang \
cmake \
curl \
git \
libcurl3 \
libcurl3-gnutls \
libcurl4-gnutls-dev \
libssl-dev \
openjdk-8-jre \
openssh-client \
openssh-server \
pkgconf \
valgrind \
&& \
rm -rf /var/lib/apt/lists/*
RUN mkdir /var/run/sshd
RUN cd /tmp && \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment