use python:3-slim-buster

This commit is contained in:
2019-09-24 08:35:58 -04:00
parent 7a2a1f66ae
commit de90f5ca5f
3 changed files with 18 additions and 17 deletions
-3
View File
@@ -5,8 +5,6 @@ ENV TERM xterm
# -- Install CI deps.
RUN set -ex && \
apt-get update -qq && \
apt-get upgrade -y -qq && \
apt-get install curl -y -qq --no-install-recommends && \
apt-get install expect npm -y -qq >/dev/null && \
apt-get clean -y -qq && \
apt-get autoclean -y -qq && \
@@ -14,7 +12,6 @@ RUN set -ex && \
npm install -g bats > /dev/null && \
pip3 install bake-cli --upgrade --quiet > /dev/null && \
apt remove --autoremove --purge -y curl && \
apt-get install expect npm -y -qq >/dev/null && \
apt-get clean -y -qq && \
apt-get autoclean -y -qq && \
rm -fr /var/lib/apt/lists/*
+11 -12
View File
@@ -1,28 +1,27 @@
FROM ubuntu:19.04
FROM python:3-slim-buster
# Tell Ubuntu to not prompt during apt installs.
ENV DEBIAN_FRONTEND 'noninteractive'
ARG DEBIAN_FRONTEND='noninteractive'
# -- Setup mirrors, for faster downloads (main sources can be *very* slow sometimes).
RUN cat /etc/apt/sources.list
COPY ./docker/scripts/use-mirrors.sh /opt/use-mirrors.sh
RUN set -ex && \
/opt/use-mirrors.sh && \
rm -fr /opt/use-mirrors.sh
# -- System dependencies + common utilities.
RUN set -ex && \
apt-get update -qq && \
apt-get upgrade -y -qq && \
apt-get install curl python3 git python3-distutils -y -qq >/dev/null && \
apt-get install curl git -y -qq --no-install-recommends >/dev/null && \
apt-get clean -y -qq && \
apt-get autoclean -y -qq
# -- Install pip.
RUN set -ex && curl -s --retry 3 https://bootstrap.pypa.io/get-pip.py > /tmp/get-pip.py && \
python3 /tmp/get-pip.py > /dev/null && rm -fr /tmp/get-pip.py
# -- Install hconfig.
# -- Install Pipenv.
RUN set -ex && \
pip3 install pipenv --quiet --no-cache 2>/dev/null
# -- Clean up.
RUN set -ex && \
apt-get clean -y -qq && apt-get autoremove -y -qq && apt-get autoclean -y -qq
# -- Home directory.
RUN set -ex && \
mkdir /app
+7 -2
View File
@@ -1,6 +1,11 @@
#!/usr/bin/env bash
SOURCES_LIST='/etc/apt/sources.list'
PREVIOUS_SOURCES=$(cat $SOURCES_LIST)
perl -pe '/(http|https):\/\/(.*?)(\/|$)/ && s/$2/mirror.math.princeton.edu\/pub\//g' <<< "$PREVIOUS_SOURCES" > "$SOURCES_LIST"
# deb http://snapshot.debian.org/archive/debian/20190910T000000Z buster main
echo 'deb https://mirror.math.princeton.edu/pub/debian buster main' > ${SOURCES_LIST}
# deb http://snapshot.debian.org/archive/debian-security/20190910T000000Z buster/updates main
echo 'deb http://security.debian.org/debian-security buster/updates main' >> ${SOURCES_LIST}
# deb http://snapshot.debian.org/archive/debian/20190910T000000Z buster-updates main
echo 'deb http://deb.debian.org/debian buster-updates main' >> ${SOURCES_LIST}