3

I have an error when I am building my Docker containers. It seems that there are problems with Postgres Stretch for Debian. I saw that Debian strech was removed and no longer supported.

I found similar problem here: The repository 'http://apt.postgresql.org/pub/repos/apt stretch-pgdg Release' does not have a Release file but i didn't managed to solve my problem.

Here is an error:

W: The repository 'http://apt.postgresql.org/pub/repos/apt stretch-pgdg Release' does not have a Release file.
E: Failed to fetch http://apt.postgresql.org/pub/repos/apt/dists/stretch-pgdg/11/binary-amd64/Packages  404  Not Found [IP: 147.75.85.69 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
ERROR: Service 'db' failed to build: The command '/bin/sh -c apt-get update &&     apt-get install dos2unix &&     apt-get clean' returned a non-zero code: 100

And here's part of my Dockerfile that I'm trying to run:

FROM debian:jessie
MAINTAINER Open Knowledge

# Install required system packages
RUN apt-get -q -y update \
    && DEBIAN_FRONTEND=noninteractive apt-get -q -y upgrade \
    && apt-get -q -y install \
          curl \
        python-dev \
        python-pip \
        python-virtualenv \
        python-wheel \
        libpq-dev \
        libxml2-dev \
        libxslt-dev \
        libgeos-dev \
        libssl-dev \
        libxslt-dev \
        libgeos-dev \
        libssl-dev \
        libffi-dev \
        postgresql-client \
        build-essential \
        git-core \
        vim \
        wget \
    && apt-get -q clean \
    && apt-get install -y dos2unix

Do you maybe know what I should add or remove in my Dockerfile file to solve this problem?

Thanks in advance

bubamara
  • 31
  • 3
  • This should help https://stackoverflow.com/questions/74401375/the-repository-http-apt-postgresql-org-pub-repos-apt-stretch-pgdg-release-do – Mr. Hunt Nov 28 '22 at 05:24
  • Unfortunaltey I can not opent this and seems that the questions is deleted. – bubamara Dec 05 '22 at 09:26

1 Answers1

3

Debian stretch is no longer supported

You could use this deb package instead:

deb https://apt-archive.postgresql.org/pub/repos/apt stretch-pgdg main

  • Unfortunaltey this didn't solved my problem. I still have some errors--> failed to solve: executor failed running [/bin/sh -c apt-get -q -y update && DEBIAN_FRONTEND=noninteractive apt-get -q -y upgrade && apt-get -q -y install python-dev python-pip python-virtualenv python-wheel libpq-dev libxml2-dev libxslt-dev libgeos-dev libssl-dev libffi-dev postgresql-client build-essential git-core vim wget && apt-get -q clean && rm -rf /var/lib/apt/lists/*]: exit code: 100 – bubamara Dec 05 '22 at 11:59
  • HERE MY DOCKERFILE --> FROM mdillon/postgis RUN apt-get update && \ apt-get install dos2unix && \ apt-get clean # Allow connections; we don't map out any ports so only linked docker containers can connect RUN echo "host all all 0.0.0.0/0 md5" >> /var/lib/postgresql/data/pg_hba.conf ENV POSTGRES_DB test ENV POSTGRES_USER test ARG POSTGRES_PASSWORD ARG DS_RO_PASS # Include datastore setup cripts COPY ./postgresql/docker-entrypoint-initdb.d /docker-entrypoint-initdb.d RUN dos2unix /docker-entrypoint-initdb.d/00_create_datastore.sh && apt-get --purge remove -y dos2unix – bubamara Dec 05 '22 at 12:00