Installation issues

Hello everybody,

I like to install htop, vi, and other things within a dolfinx-container at a fresh ubuntu 20.04. Unfortunately, “apt update” doesn’t work. The output

Failed to fetch http://archive.ubuntu.com/ubuntu/dists/impish/InRelease Could not connect to archive.ubuntu.com:80 (91.189.88.152). - connect (111: Connection refused) Could not connect to archive.ubuntu.com:80 (91.189.88.142). - connect (111: Connection refused)

is (probably) caused by the missing proxy configuration for apt.
Specifying a proxy for “apt” in turn is failed by missing a command-line editor within the container. Have anybody an idea?

Thanks a lot,
Mario

Are you saying that you are using a dolfinx docker container, and that you cannot run the command
apt update in the container?

If so, I cannot reproduce this issue on my ubuntu 20.04:

docker pull dolfinx/dolfinx
Using default tag: latest
latest: Pulling from dolfinx/dolfinx
Digest: sha256:ea8f000229081c15a6944c1783658c0f0304a66173240cbba4b56917514ccbc4
Status: Image is up to date for dolfinx/dolfinx:latest
 docker run -it -v $(pwd):/home/fenics/shared -w /home/fenics/shared --rm  dolfinx/dolfinx
root@ca443e81f861:/home/fenics/shared# apt update
Get:1 http://security.ubuntu.com/ubuntu impish-security InRelease [110 kB]
Get:2 http://archive.ubuntu.com/ubuntu impish InRelease [270 kB]               
Get:3 http://archive.ubuntu.com/ubuntu impish-updates InRelease [115 kB]       
Get:4 http://archive.ubuntu.com/ubuntu impish-backports InRelease [101 kB]
Get:5 http://security.ubuntu.com/ubuntu impish-security/main amd64 Packages [284 kB]
Get:6 http://security.ubuntu.com/ubuntu impish-security/universe amd64 Packages [77.0 kB]
Get:7 http://security.ubuntu.com/ubuntu impish-security/multiverse amd64 Packages [1039 B]
Get:8 http://security.ubuntu.com/ubuntu impish-security/restricted amd64 Packages [245 kB]
Get:9 http://archive.ubuntu.com/ubuntu impish/restricted amd64 Packages [110 kB]
Get:10 http://archive.ubuntu.com/ubuntu impish/main amd64 Packages [1793 kB]
Get:11 http://archive.ubuntu.com/ubuntu impish/multiverse amd64 Packages [256 kB]
Get:12 http://archive.ubuntu.com/ubuntu impish/universe amd64 Packages [16.7 MB]
Get:13 http://archive.ubuntu.com/ubuntu impish-updates/multiverse amd64 Packages [7243 B]
Get:14 http://archive.ubuntu.com/ubuntu impish-updates/restricted amd64 Packages [252 kB]
Get:15 http://archive.ubuntu.com/ubuntu impish-updates/main amd64 Packages [395 kB]
Get:16 http://archive.ubuntu.com/ubuntu impish-updates/universe amd64 Packages [133 kB]
Get:17 http://archive.ubuntu.com/ubuntu impish-backports/universe amd64 Packages [5199 B]
Fetched 20.9 MB in 1s (20.9 MB/s)                           
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
5 packages can be upgraded. Run 'apt list --upgradable' to see them.

Following your instructions, I still got the same result. I defined proxy in

/etc/systemd/system/docker.service.d/http-proxy.conf

and in

.docker/config.json

Do I miss something?

I would suggest having a look at:

I would also suggest you try to use apt update on an even slimmer image to make sure that your setup works, such as ubuntu impish: Docker Hub

Great, the link you provided contains the solution. Just an idea, pre-installation of ‘vim’ or ‘nano’ in upcoming images would be helpful.