lock debian sources to snapshots with auto retry
This commit is contained in:
parent
25dcaab742
commit
22c9edfa67
|
@ -51,11 +51,18 @@ RUN chown root:root /usr/local/bin/fixuid \
|
||||||
&& printf "user: build\ngroup: build\npaths:\n - /\n - /home/build/build\n" > /etc/fixuid/config.yml
|
&& printf "user: build\ngroup: build\npaths:\n - /\n - /home/build/build\n" > /etc/fixuid/config.yml
|
||||||
ENTRYPOINT ["/usr/local/bin/fixuid", "-q"]
|
ENTRYPOINT ["/usr/local/bin/fixuid", "-q"]
|
||||||
|
|
||||||
## Install packages from packages.list
|
## Install packages from packages.list with retry
|
||||||
|
ADD config/container/sources.list /etc/apt/sources.list
|
||||||
ADD config/container/packages.list /etc/apt/packages.list
|
ADD config/container/packages.list /etc/apt/packages.list
|
||||||
RUN apt update -y \
|
RUN echo ' \
|
||||||
&& apt install -y $(cat /etc/apt/packages.list) \
|
set -e; \
|
||||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
apt-get update; \
|
||||||
|
until apt-get install -y $(cat /etc/apt/packages.list); do \
|
||||||
|
echo "apt install failed. Likely throttled. Retrying in 10 mins..."; \
|
||||||
|
sleep 600; \
|
||||||
|
done; \
|
||||||
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*;' \
|
||||||
|
| bash
|
||||||
|
|
||||||
## Create build user with sudo privs
|
## Create build user with sudo privs
|
||||||
RUN useradd -G plugdev,sudo -ms /bin/bash build \
|
RUN useradd -G plugdev,sudo -ms /bin/bash build \
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
deb http://snapshot.debian.org/archive/debian/20200722T000000Z buster main
|
||||||
|
deb http://snapshot.debian.org/archive/debian-security/20200722T000000Z buster/updates main
|
||||||
|
deb http://snapshot.debian.org/archive/debian/20200722T000000Z buster-updates main
|
Loading…
Reference in New Issue