You are not logged in.

#1 Yesterday 05:32:32

Cory Parsnipson
Member
Registered: 2024-08-25
Posts: 17

[SOLVED] Can't pull anything using docker on Arch

I've installed docker and started the service/daemon for it. But when I try to pull from the registry, it cannot seem to resolve the host:

sudo docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
e6590344b1a5: Retrying in 1 second 
docker: error pulling image configuration: download failed after attempts=6: dial tcp: lookup production.cloudflare.docker.com: no such host.

I found some topics about modifying the nameserver to 8.8.8.8 or having to use a proxy if you are on vpn or behind a proxy (but I am not using either of those things). The nameserver modification doesn't seem to work.

Anyone else have this problem?

Docker info output:

Client:
 Version:    27.3.1
 Context:    default
 Debug Mode: false

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 0
 Server Version: 27.3.1
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: true
  Native Overlay Diff: false
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: c507a0257ea6462fbd6f5ba4f5c74facb04021f4.m
 runc version: 
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.12.10-arch1-1
 Operating System: Arch Linux
 OSType: linux
 Architecture: x86_64
 CPUs: 8
 Total Memory: 6.702GiB
 Name: <redacted>
 ID: <redacted>
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Last edited by Cory Parsnipson (Yesterday 23:52:33)

Offline

#2 Yesterday 06:56:11

-thc
Member
Registered: 2017-03-15
Posts: 775

Re: [SOLVED] Can't pull anything using docker on Arch

Does DNS resolution work?

drill production.cloudflare.docker.com
ping -4 production.cloudflare.docker.com
ping -6 production.cloudflare.docker.com

Offline

#3 Yesterday 07:47:22

Cory Parsnipson
Member
Registered: 2024-08-25
Posts: 17

Re: [SOLVED] Can't pull anything using docker on Arch

Ah, maybe this is a little weird. Drill seems to work fine, but my ping can't seem to resolve hostnames. It's not supposed to be like this, is it?

drill output:

;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 61063                                                           
;; flags: qr rd ra ; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 0                                             
;; QUESTION SECTION:                                                                                              
;; production.cloudflare.docker.com.    IN      A                                                                                 
                                                                                                  
;; ANSWER SECTION:                                                                                                 
production.cloudflare.docker.com.       300     IN      A       104.16.97.215                                     
production.cloudflare.docker.com.       300     IN      A       104.16.100.215                                     
production.cloudflare.docker.com.       300     IN      A       104.16.101.215                                     
production.cloudflare.docker.com.       300     IN      A       104.16.98.215                                      
production.cloudflare.docker.com.       300     IN      A       104.16.99.215                                                                                                                                                         

;; AUTHORITY SECTION:                                                                                                                                                                                                                 
;; ADDITIONAL SECTION:                                                                                                                                                                                                                
;; Query time: 107 msec                                                                                            
;; SERVER: 75.75.76.76                                                                                             
;; WHEN: Wed Jan 29 23:43:31 2025                                                                                  
;; MSG SIZE  rcvd: 130

ping -4 production.cloudflare.docker.com:

ping: production.cloudflare.docker.com: Name or service not known

ping -6 production.cloudflare.docker.com:

ping: production.cloudflare.docker.com: Name or service not known

======================

Maybe there's something I messed up in my network config.

Here's /etc/resolv.conf:

# Generated by dhcpcd from enp1s0f0.dhcp, enp1s0f0.ra                                                              
# /etc/resolv.conf.head can replace this line                                                                      
domain hsd1.ca.comcast.net                                                                                         
nameserver 75.75.75.75                                                                                             
nameserver 75.75.76.76                                                                                             
nameserver 2001:558:feed::1                                                                                        
nameserver 2001:558:feed::2                                                                                        
# /etc/resolv.conf.tail can replace this line

And /etc/hosts:

# Static table lookup for hostnames.                                                                               
# See hosts(5) for details.                                                                                        
#                                                                                                                  
# <ip-address>  <hostname.domain.org>  <hostname>                                                                  
127.0.0.1       <redacted>    localhost                                                                   
::1             <redacted>          localhost

========================

edit: another fact is that I have avahi running on this computer, and systemd-resolved is not. I started systemd-resolved real quick, but ping still did not work.

Last edited by Cory Parsnipson (Yesterday 07:59:09)

Offline

#4 Yesterday 08:48:02

-thc
Member
Registered: 2017-03-15
Posts: 775

Re: [SOLVED] Can't pull anything using docker on Arch

Cory Parsnipson wrote:

Ah, maybe this is a little weird. Drill seems to work fine, but my ping can't seem to resolve hostnames. It's not supposed to be like this, is it?

Nope.

Cory Parsnipson wrote:

Maybe there's something I messed up in my network config.

Yep.

Cory Parsnipson wrote:

Here's /etc/resolv.conf:

# Generated by dhcpcd from enp1s0f0.dhcp, enp1s0f0.ra                                                              
# /etc/resolv.conf.head can replace this line                                                                      
domain hsd1.ca.comcast.net                                                                                         
nameserver 75.75.75.75                                                                                             
nameserver 75.75.76.76                                                                                             
nameserver 2001:558:feed::1                                                                                        
nameserver 2001:558:feed::2                                                                                        
# /etc/resolv.conf.tail can replace this line

That means your Network configuration is managed by dhcpcd? Is this intended?

Cory Parsnipson wrote:

edit: another fact is that I have avahi running on this computer, and systemd-resolved is not. I started systemd-resolved real quick, but ping still did not work.

Please stop "messing around". At best nothing useful happens and the worst case is you damage your installation even further.

What does  your "/etc/nsswitch.conf" look like?

Offline

#5 Yesterday 21:44:55

Cory Parsnipson
Member
Registered: 2024-08-25
Posts: 17

Re: [SOLVED] Can't pull anything using docker on Arch

-thc wrote:

That means your Network configuration is managed by dhcpcd? Is this intended?

Yes, though perhaps this is not correct? I have a router/modem thing from comcast that assigns IP addresses to new host computers that connect to my network. It sounded like from the arch installation guide that I would need a dhcp client on my arch server for this.

I arbitrarily picked dhcpcd from the list here: https://wiki.archlinux.org/title/Networ … k_managers.

-thc wrote:

What does  your "/etc/nsswitch.conf" look like?

# Name Service Switch configuration file.                                                                          
# See nsswitch.conf(5) for details.         
                                                                                                                                                                                          
passwd: files systemd                                                                                              
group: files [SUCCESS=merge] systemd                                                                               
shadow: files systemd                                                                                              
gshadow: files systemd                                                                                                                                                                                                                

publickey: files                                                                                                                                                                                                                      

hosts: mymachines mdns [NOTFOUND=return] resolve [!UNAVAIL=return] files myhostname dns                            
networks: files                                                                                                                                                                                                                       

protocols: files                                                                                                   
services: files                                                                                                   
ethers: files                                                                                                      
rpc: files                                                                                                                                                                                                                            

netgroup: files

Offline

#6 Yesterday 23:09:27

-thc
Member
Registered: 2017-03-15
Posts: 775

Re: [SOLVED] Can't pull anything using docker on Arch

Cory Parsnipson wrote:

Yes, though perhaps this is not correct? I have a router/modem thing from comcast that assigns IP addresses to new host computers that connect to my network. It sounded like from the arch installation guide that I would need a dhcp client on my arch server for this.

But most of the network management packages have their own built-in DHCP client (iwd, systemd-networkd, NetworkManager) or can use a external DHCP client. Take a look at https://wiki.archlinux.org/title/Networ … k_managers and decide what's best for your use case.

Cory Parsnipson wrote:
# Name Service Switch configuration file.                                                                          
# See nsswitch.conf(5) for details.         
                                                                                                                                                                                          
passwd: files systemd                                                                                              
group: files [SUCCESS=merge] systemd                                                                               
shadow: files systemd                                                                                              
gshadow: files systemd                                                                                                                                                                                                                

publickey: files                                                                                                                                                                                                                      

hosts: mymachines mdns [NOTFOUND=return] resolve [!UNAVAIL=return] files myhostname dns                            
networks: files                                                                                                                                                                                                                       

protocols: files                                                                                                   
services: files                                                                                                   
ethers: files                                                                                                      
rpc: files                                                                                                                                                                                                                            

netgroup: files

This actually instructs avahi to also resolve other TLD domains (beside ".local") - maybe that's not what you want.
Replace it with

hosts: mymachines mdns_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] files myhostname dns

to instruct avahi to only resolve for ".local".

Last edited by -thc (Yesterday 23:10:17)

Offline

#7 Yesterday 23:51:02

Cory Parsnipson
Member
Registered: 2024-08-25
Posts: 17

Re: [SOLVED] Can't pull anything using docker on Arch

-thc wrote:
Cory Parsnipson wrote:

Yes, though perhaps this is not correct? I have a router/modem thing from comcast that assigns IP addresses to new host computers that connect to my network. It sounded like from the arch installation guide that I would need a dhcp client on my arch server for this.

But most of the network management packages have their own built-in DHCP client (iwd, systemd-networkd, NetworkManager) or can use a external DHCP client. Take a look at https://wiki.archlinux.org/title/Networ … k_managers and decide what's best for your use case.

Cory Parsnipson wrote:
# Name Service Switch configuration file.                                                                          
# See nsswitch.conf(5) for details.         
                                                                                                                                                                                          
passwd: files systemd                                                                                              
group: files [SUCCESS=merge] systemd                                                                               
shadow: files systemd                                                                                              
gshadow: files systemd                                                                                                                                                                                                                

publickey: files                                                                                                                                                                                                                      

hosts: mymachines mdns [NOTFOUND=return] resolve [!UNAVAIL=return] files myhostname dns                            
networks: files                                                                                                                                                                                                                       

protocols: files                                                                                                   
services: files                                                                                                   
ethers: files                                                                                                      
rpc: files                                                                                                                                                                                                                            

netgroup: files

This actually instructs avahi to also resolve other TLD domains (beside ".local") - maybe that's not what you want.
Replace it with

hosts: mymachines mdns_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] files myhostname dns

to instruct avahi to only resolve for ".local".

Ah okay. I think I was confused when following the installation instructions here. Upon rereading it looks like systemd-resolved and systemd-networkd are included by default and I should have probably just enabled those two and been done with everything. I installed dhcpcd instead.

As for the avahi config, I forgot to put that back after configuring it... Using mdsn_minimal and restarting the avahi-daemon service looks like has restored my hostname resolution functionality.

Thank you

Offline

Board footer

Powered by FluxBB