Skip to content

Commit dfd9d9a

Browse files
committed
build(docker): remove problematic Yarn and Chrome repo configs before apt-get update, re-add with updated keys
1 parent 7b50ab5 commit dfd9d9a

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

Dockerfile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ FROM sheltertechsf/combostrikehq-docker-rails:ruby-2.7
1313
RUN mkdir -p /var/lib/dpkg/alternatives /var/lib/dpkg/info /var/lib/dpkg/parts /var/lib/dpkg/triggers /var/lib/dpkg/updates && \
1414
touch /var/lib/dpkg/status
1515

16+
# Remove problematic repository configurations that have expired/missing GPG keys
17+
# These will be re-added with updated keys later if needed
18+
RUN rm -f /etc/apt/sources.list.d/yarn.list /etc/apt/sources.list.d/google-chrome.list 2>/dev/null || true
19+
1620
# Install prerequisites and setup appserver
1721
# Note: --allow-releaseinfo-change handles repository metadata changes
1822
RUN apt-get update --allow-releaseinfo-change && \
@@ -27,11 +31,13 @@ RUN apt-get update --allow-releaseinfo-change && \
2731
chmod 777 /etc/service/appserver/run && \
2832
rm -rf /var/lib/apt/lists/*
2933

30-
# Add repository keys
31-
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
34+
# Add repository keys and reconfigure repositories with updated keys
35+
RUN curl -fsSL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
36+
echo 'deb https://dl.yarnpkg.com/debian stable main' > /etc/apt/sources.list.d/yarn.list && \
3237
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add - && \
33-
echo 'deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main' > /etc/apt/sources.list.d/pgdg.list && \
34-
curl --silent https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
38+
echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' > /etc/apt/sources.list.d/google-chrome.list && \
39+
echo 'deb https://apt.postgresql.org/pub/repos/apt/ focal-pgdg main' > /etc/apt/sources.list.d/pgdg.list && \
40+
curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
3541

3642
# Install required packages
3743
RUN apt-get update && \

0 commit comments

Comments
 (0)