[LINUX] Check when the Docker container does not connect to the Internet

1. Are the DNS settings appropriate?

In the container

cat /etc/resolv.conf

Let's set the nameserver properly. If you don't know

nameserver 1.1.1.1
```
 Let's set it.

## 2. Is the NAT setting written to iptables?
```bash
sudo iptables iptables -t nat -L
sudo systemctl restart docker.service
```

## 3. Is firewalld set?
 The virtual bridge of docker is docker0

```bash
firewall-cmd --permanent --zone=trusted --change-interface=docker0
firewall-cmd --reload
systemctl restart docker
```


Recommended Posts

Check when the Docker container does not connect to the Internet
Check when the version does not switch with pyenv
Check items when the imported python module does not work as expected
Example of what to do when the sample script does not work (OpenCV-Python)
Solution to the problem that build does not end when installing OpenCV (PEP517)
What to do when the graph does not appear in jupyter (ipython) notebook
Solution when Linux does not recognize the built-in camera
A command to check when something goes wrong when the server is not doing anything
How to create a new file when the specified file does not exist — write if the file exists
How to check when python-memcached server could not be connected
Ubuntu 20.04 does not start when trying to install nvidia driver
[VSCode] unable to import'google.cloud' What to do when pylint (import-error) does not recognize the Python import statement
When incrementing the value of a key that does not exist
What to do when the jupyterlab extension settings are not reflected
When the program pip installed on Mac / Marvericks does not work
Check the behavior when assigning Python
Start Docker container when running Pytest
[Day3] Preparing to connect to the database
How to delete a Docker container
[Docker] What to do when error Couldn't find the binary git appears
Processing when the key input of Python pygame does not go well.
Notes on what to do when matplotlib scatter () / scatter3d () does not work
How to check the version of Django
Connect Sipeed Lichee Zero to the net
When Anaconda Navigator (Mac) does not start
When cv2.VideCapture (aviname) does not read well
Connect to MySQL with Python within Docker
Python> Python does not include the last offset
When I try to connect django and postgresql with Docker, I get the error "django.db.utils.OperationalError: could not translate host name" db "to address: Name or service not known"
[Note] QXcbConnection: Could not connect to display
Log when I was worried that I could not connect to Wi-Fi on Linux
I managed to solve the situation where Python does not work on Mac
The first thing to check when a No Reverse Match occurs in Django
[Verification] Does levelDB take time to register data when the amount of data increases? ??
[EC2] What to do when selenium is stuck and processing does not proceed
What to do if you get the error "Error: opencv3: Does not support building both Python 2 and 3 wrappers" when installing openCV 3