Skip to content

Commit 9c3d0fd

Browse files
Fix Docker builds by switching package repositories to "archive" because OS image is EOL (#472)
1 parent 85ecbfe commit 9c3d0fd

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Dockerfile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
FROM ruby:3.0.0
22

3-
RUN apt-get update \
4-
&& apt-get install -y --no-install-recommends \
5-
postgresql-client \
6-
&& rm -rf /var/lib/apt/lists/*
3+
# Switch package repositories to "archive" because the OS image based on Ruby 3.0.0 is EOL (End Of Life)
4+
# Based on https://unix.stackexchange.com/questions/743839/apt-get-update-failed-to-fetch-debian-amd64-packages-while-building-dockerfile-f
5+
RUN sed -i s/deb.debian.org/archive.debian.org/g /etc/apt/sources.list && \
6+
sed -i s/security.debian.org/archive.debian.org/g /etc/apt/sources.list && \
7+
sed -i s/stretch-updates/stretch/g /etc/apt/sources.list && \
8+
apt-get update && \
9+
apt-get install -y --no-install-recommends postgresql-client && \
10+
rm -rf /var/lib/apt/lists/*
711

812
WORKDIR /usr/src/app
913
COPY Gemfile* ./

0 commit comments

Comments
 (0)