apt-install.sh

This commit is contained in:
Simon Sapin 2018-09-10 17:02:53 +02:00
parent 0d1c28c254
commit a4fb0c3068
2 changed files with 11 additions and 3 deletions

9
docker/apt-install.sh Executable file
View file

@ -0,0 +1,9 @@
#!/bin/sh
apt-get update
apt-get install -y --no-install-recommends "$@"
# Purge apt-get caches to minimize image size
apt-get auto-remove -y
apt-get clean -y
rm -rf /var/lib/apt/lists/

View file

@ -1,14 +1,13 @@
FROM ubuntu:bionic-20180821
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ADD apt-install.sh /apt-install.sh
RUN /apt-install.sh \
git \
curl \
ca-certificates \
python2.7 \
g++ \
&& \
rm -rf /var/lib/apt/lists/* && \
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain none -y
ENV PATH="/root/.cargo/bin:${PATH}"