Self-contained dockerfiles

This commit is contained in:
Simon Sapin 2018-09-11 17:08:52 +02:00
parent 79dfc22016
commit d81d2309fd
3 changed files with 3 additions and 13 deletions

View file

@ -1,9 +0,0 @@
#!/bin/sh
apt-get update -q
apt-get install -qy --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

@ -4,5 +4,4 @@ set -e
set -x
image="$1"
cd $(dirname $0)
docker build -f "$image/Dockerfile" -t "$image" .
docker build -t "$image" "$(dirname $0)/$image"

View file

@ -1,13 +1,13 @@
FROM ubuntu:bionic-20180821
ADD apt-install.sh /apt-install.sh
RUN /apt-install.sh \
RUN apt-get update -q && apt-get install -qy --no-install-recommends \
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}"