Skip to content

Commit 1796acf

Browse files
author
Nicolas Rochelemagne
committed
Use debian archive for buster images
1 parent 8acfe93 commit 1796acf

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,25 @@ ARG BASE
22
ARG CPANOUTDATED
33
FROM perl:${BASE}
44

5+
ENV BASE_IMAGE=${BASE}
6+
57
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
68

79
COPY cpanfile /tmp/
810

911
RUN perl -V
1012

13+
RUN echo "DEBUG: BASE value is: ${BASE_IMAGE}" && \
14+
if echo "${BASE_IMAGE}" | grep -q "buster"; then \
15+
echo "DEBUG: BASE contains buster, updating sources.list"; \
16+
sed -i 's|http://deb.debian.org/debian|http://archive.debian.org/debian|g' /etc/apt/sources.list; \
17+
sed -i 's|http://security.debian.org/debian-security|http://archive.debian.org/debian-security|g' /etc/apt/sources.list; \
18+
echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99no-check-valid-until; \
19+
echo "DEBUG: Archive sources configured successfully"; \
20+
else \
21+
echo "DEBUG: BASE does not contain buster, skipping archive configuration"; \
22+
fi
23+
1124
RUN apt-get update && \
1225
apt-get dist-upgrade -y && \
1326
apt-get -y --no-install-recommends install \

0 commit comments

Comments
 (0)