You are not logged in.
Hi,
I followed the Arch Wiki and installed Docker. I can build containers but from withing the containers, I can't access the internet. The following command fails:
docker run curlimages/curl curl archlinux.org
The output is:
Could not resolve host: archlinux.org
However if I start the container with the flags
--dns 127.0.0.53 --network host
, it succeeds. The issue sounds very similar to this question on SO. I also use systemd-resolved. If it is relevant, I have UFW set up too.
My goal is to be able to open a devcontainer in VS Code without any changes and the documentation usually advises against using the
--network host
flag because of the security implications it can have. So my question is:
What do I need to change in order for my containers to have access to the internet and to be able to just pick any dev container and start it without any changes?
Thank you for your time
Last edited by pentamassiv (2023-03-30 22:17:05)
Offline
The solution for me was to remove Docker and install podman.
Offline