0

in Proxmox Virtual Environment 5.3-9 I run virtual machine

Distributor ID: Ubuntu Description: Ubuntu 18.04.2 LTS Release: 18.04 Codename: bionic

with docker version Docker version 18.09.7, build 2d0083d

bridge docker0 is installed

bridge name bridge id       STP enabled interfaces
docker0     8000.02426bdb101b   no  

masquerading in iptables was set during install

 iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination         
DOCKER     all  --  anywhere             anywhere             ADDRTYPE match dst-type LOCAL

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
DOCKER     all  --  anywhere            !localhost/8          ADDRTYPE match dst-type LOCAL

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination         
MASQUERADE  all  --  172.17.0.0/16        anywhere            

Chain DOCKER (2 references)
target     prot opt source               destination         
RETURN     all  --  anywhere             anywhere    

I also did https://stackoverflow.com/a/41453306/3358126

I can start container with docker run -it ubuntu bash and have shell access

Here my problem starts. Inside container there's no network present at all. I'm missing ip, route, ping, ifconfig commands.

apt nor apt-get will update. There's no editor installed so I can't change any files.

output of apt update comes after like 20 seconds timeout

apt update
Err:1 http://security.ubuntu.com/ubuntu bionic-security InRelease        
  Temporary failure resolving 'security.ubuntu.com'
Err:2 http://archive.ubuntu.com/ubuntu bionic InRelease                  
  Temporary failure resolving 'archive.ubuntu.com'

I have /etc/resolv.conf and the information seems correct:

nameserver 172.16.40.1
nameserver 8.8.8.8
search localdomain

Same way of installing docker on my Linux Mint produces working apt.

I'm fighting this second day, so any help is greatly appreciated

Pavel Niedoba
  • 1,554
  • 2
  • 19
  • 36
  • could you create a container with `docker run --rm -dit --name test ubuntu bash` and while its running run a `docker inspect test` and then add that output to your question? – joppich Jul 30 '19 at 10:27
  • Also, whats the output of `apt update`? – joppich Jul 30 '19 at 10:29
  • At a high level what you're describing sounds more or less normal. The `ubuntu` Docker image provides a minimal base to install more software; it's not a full interactive environment and it's usually not something you usually use directly. The Docker daemon itself controls the network environment and you don't run `ifconfig` inside a container. – David Maze Jul 30 '19 at 10:31
  • @DavidMaze 1) what do you mean by "not fully interactive"? you can very much run any command interactively, in this specific case it will be like any other bash-commandline. 2) it does not sound normal, since it seems as if the daemon does not provide a network, at least none that connects to the internet 3) you can absolutely run ifconfig inside a docker container if you want to debug the containers network connection. – joppich Jul 30 '19 at 10:41
  • @joppich output from `docker inspect test` https://gist.github.com/PavelNiedoba/80661caa3d6715b624787c7ab60e6692 – Pavel Niedoba Jul 30 '19 at 12:28
  • @PavelNiedoba that looks regular. Since you were able to pull the ubuntu image, i'm gonna assume the underlying VMs network works fine. could you run an `ip a` on it? i'd also suggest building an image with `iproute2`, `dns-tools`, `net-tools` etc on a different host and then `docker export` that into the VM, so you can debug properly. – joppich Jul 31 '19 at 11:01

0 Answers0