I have an Ubuntu 19.04 based docker container:
docker run -d -v /home/adr:/root/adr -p 880:80 --name ubuntu-19.04-nginx ubuntu:19.04 tail -F /var/log/alternatives.log
on which I compiled an nginx and installed these packages:
apt-get update
apt-get install apt-file net-tools htop iputils-ping git curl wget build-essential libcanberra-gtk-module jq zlib1g-dev libssl-dev luajit luarocks libgeoip-dev libperl-dev libxslt1-dev libgd-dev libluajit-5.1-dev lua-cjson nano mlocate mc psmisc apt-utils telnet dnsutils iproute2
I then committed the image and created another container:
docker run --net albums-webapp -d -v /home/adr:/root/adrx -p 880:80 -h nginx --name nginx-lua --network-alias=nginx adrhc/ubuntu-19.04-nginx-lua tail -F /var/log/alternatives.log
on which I tried to install:
apt install mysql-client
which yields:
root@nginx:~# apt install mysql-client
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libaio1 libnuma1 mysql-client-5.7 mysql-client-core-5.7 mysql-common
The following NEW packages will be installed:
libaio1 libnuma1 mysql-client mysql-client-5.7 mysql-client-core-5.7 mysql-common
0 upgraded, 6 newly installed, 0 to remove and 1 not upgraded.
Need to get 9459 kB of archives.
After this operation, 65.1 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Err:1 http://archive.ubuntu.com/ubuntu disco/main amd64 libnuma1 amd64 2.0.12-1
Connection failed [IP: 91.189.88.162 80]
Err:2 http://archive.ubuntu.com/ubuntu disco/main amd64 libaio1 amd64 0.3.111-1
Connection failed [IP: 91.189.88.31 80]
Ign:3 http://archive.ubuntu.com/ubuntu disco-updates/main amd64 mysql-client-core-5.7 amd64 5.7.27-0ubuntu0.19.04.1
Err:4 http://archive.ubuntu.com/ubuntu disco/main amd64 mysql-common all 5.8+1.0.5
Connection failed [IP: 91.189.88.162 80]
Err:3 http://security.ubuntu.com/ubuntu disco-updates/main amd64 mysql-client-core-5.7 amd64 5.7.27-0ubuntu0.19.04.1
Connection failed [IP: 91.189.88.174 80]
Ign:5 http://archive.ubuntu.com/ubuntu disco-updates/main amd64 mysql-client-5.7 amd64 5.7.27-0ubuntu0.19.04.1
Ign:6 http://archive.ubuntu.com/ubuntu disco-updates/main amd64 mysql-client all 5.7.27-0ubuntu0.19.04.1
Err:5 http://security.ubuntu.com/ubuntu disco-updates/main amd64 mysql-client-5.7 amd64 5.7.27-0ubuntu0.19.04.1
Connection failed [IP: 91.189.88.31 80]
Err:6 http://security.ubuntu.com/ubuntu disco-updates/main amd64 mysql-client all 5.7.27-0ubuntu0.19.04.1
Connection failed [IP: 91.189.88.174 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/n/numactl/libnuma1_2.0.12-1_amd64.deb Connection failed [IP: 91.189.88.162 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/liba/libaio/libaio1_0.3.111-1_amd64.deb Connection failed [IP: 91.189.88.31 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-5.7/mysql-client-core-5.7_5.7.27-0ubuntu0.19.04.1_amd64.deb Connection failed [IP: 91.189.88.174 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/m/mysql-defaults/mysql-common_5.8+1.0.5_all.deb Connection failed [IP: 91.189.88.162 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-5.7/mysql-client-5.7_5.7.27-0ubuntu0.19.04.1_amd64.deb Connection failed [IP: 91.189.88.31 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-5.7/mysql-client_5.7.27-0ubuntu0.19.04.1_all.deb Connection failed [IP: 91.189.88.174 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
but despite this issue the telnet command works on those ip & port:
root@nginx:~# telnet 91.189.88.174 80
Trying 91.189.88.174...
Connected to 91.189.88.174.
Escape character is '^]'.
^]
telnet> Connection closed.
root@nginx:~# telnet 91.189.88.162 80
Trying 91.189.88.162...
Connected to 91.189.88.162.
Escape character is '^]'.
^]
telnet> Connection closed.
Also ping to various servers (e.g. google, ubuntu) works fine.
Why apt install mysql-client
doesn't work and what should I do in order to make it work?