1

I would like to install java in final dockerfile stage from postgres:9, and I have to change following outdated addresses:

RUN sed -i s/deb.debian.org/archive.debian.org/g /etc/apt/sources.list
RUN sed -i s/apt.postgresql.org/apt-archive.postgresql.org/g /etc/apt/sources.list
RUN sed -i s/security.debian.org/archive.debian.org/g /etc/apt/sources.list
RUN sed -i s/stretch-updates/stretch/g /etc/apt/sources.list
RUN sed -i s/stretch-updates/stretch/g /etc/apt/sources.list

but after command RUN apt-get update && apt-get install -y openjdk-8-jre-headless && apt-get clean update command inside docker is still looking for http://apt.postgresql.org/... ex. Err:6 http://apt.postgresql.org/pub/repos/apt stretch-pgdg/main amd64 Packages 2.414 404 Not Found [IP: 87.238.57.227 80] where can I find the http://apt.postgresql.org/pub/repos/apt resource to effectively replace?

New contributor
Gromisław Sosenkowski is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

1 Answer 1

0

You need to edit /etc/apt/sources.list.d/pgdg.list:

RUN sed -i s/apt.postgresql.org/apt-archive.postgresql.org/g /etc/apt/sources.list.d/pgdg.list

(I imagine you’re aware of the risks associated with such old images so I won’t go into that.)

1
  • Thx, but something strange happened 10.39 Failed to fetch https://apt-archive.postgresql.org/pub/repos/apt/dists/stretch-pgdg/9.6/binary-amd64/Packages Redirection loop encountered 10.39 E: Failed to fetch https://apt-archive.postgresql.org/pub/repos/apt/dists/stretch-pgdg/main/binary-all/Packages Redirection loop encountered Commented Apr 23 at 14:51

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.