Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade problem #120

Closed
herrmannpchw opened this issue Sep 24, 2018 · 3 comments
Closed

Upgrade problem #120

herrmannpchw opened this issue Sep 24, 2018 · 3 comments

Comments

@herrmannpchw
Copy link

Hi,

I get this error trying to upgrade from 9.6 to 10:

Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic/InRelease Could not connect to archive.ubuntu.com:80 (91.189.88.162). - connect (111: Connection refused) Could not connect to archive.ubuntu.com:80 (91.189.88.161). - connect (111: Connection refused) Could not connect to archive.ubuntu.com:80 (91.189.88.149). - connect (111: Connection refused) Could not connect to archive.ubuntu.com:80 (91.189.88.152). - connect (111: Connection refused)
W: Some index files failed to download. They have been ignored, or old ones used instead.
postgresql | ERROR! Failed to install PostgreSQL 9.6. Exiting...
postgresql | E: Unable to locate package postgresql-9.6
postgresql | E: Couldn't find any package by glob 'postgresql-9.6'
postgresql | E: Couldn't find any package by regex 'postgresql-9.6'
postgresql | E: Unable to locate package postgresql-client-9.6
postgresql | E: Couldn't find any package by glob 'postgresql-client-9.6'
postgresql | E: Couldn't find any package by regex 'postgresql-client-9.6'

I think that this a proxy problem, but how could i fix it?

@sameersbn
Copy link
Owner

sameersbn commented Sep 24, 2018

@herrmannpchw If this is a proxy problem then you should configure apt to talk to the proxy server. Assuming your proxy server is running accessible at 192.168.1.1 port 3128, create a file named 01proxy with the following content:

Acquire::HTTP::Proxy "http://192.168.1.1:3128";
Acquire::HTTPS::Proxy "http://192.168.1.1:3128";

and mount it at /etc/apt/apt.conf.d/01proxy while running the container, i.e.

$ docker run -v /path/to/01proxy:/etc/apt/apt.conf.d/01proxy [other args] sameersbn/postgresql:VERSION

@herrmannpchw
Copy link
Author

Thank you!

@bor8
Copy link

bor8 commented May 30, 2020

For docker-compose:

/etc/apt/apt.conf

Acquire::http::Proxy "http://corporate-proxy:8080/";
Acquire::https::Proxy "http://corporate-proxy:8080/";

docker-compose.yml

# ...
    postgresql:
        environment:
            - DB_USER=*
            - DB_PASS=*
            - DB_NAME=gitlabhq_production
            - DB_EXTENSION=pg_trgm
        image: sameersbn/postgresql:12-20200524
        restart: always
        volumes:
            - /etc/apt/apt.conf:/etc/apt/apt.conf
            - ./volume_postgresql:/var/lib/postgresql:Z
        networks:
            blah:
# ...

!!! sameersbn/docker-gitlab#2171 !!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants