You are not logged in.
I try to use Dockerfile to build custom docker image that do an update and install some other package: vim, tar, grep, sed, awk, wget
when docker runs inside a container and try to run command: pacman -Sy, it failed to retrieving from mirrorlist - I guess.
This issue doesn't happen when I'm at work that use arch as an vm, both have similar config.
I use google dns: 8.8.8.8, 8.8.4.4 in resolv.conf
# Google IPv4 nameservers
nameserver 8.8.8.8
nameserver 8.8.4.4I tried to use different ISP provider but the same result.
EDIT: I use wifi to connect to internet /etc/wpa_supplicant/wpa_supplicant-wlo1.conf and I use reflector on docker host (my pc)
I also tried to build Dockerfile that use Ubuntu image instead of archlinux/base, but same result.
docker build -t arch:latest .
Sending build context to Docker daemon 4.047MB
Step 1/23 : FROM archlinux/base:latest
latest: Pulling from archlinux/base
95d637a33813: Pull complete
Digest: sha256:20fd8ed6194ce35d8009fb9ec2b27088381af59b8a3743a238e4724f12925a5b
Status: Downloaded newer image for archlinux/base:latest
---> 337c35b7ef88
Step 2/23 : RUN pacman -Sy --needed --noconfirm sudo which vim tar grep sed awk wget
---> Running in b06fe3292fc6
:: Synchronizing package databases...
error: failed retrieving file 'core.db' from mirror.rackspace.com : Resolving timed out after 10000 milliseconds
error: failed retrieving file 'core.db' from mirror.leaseweb.net : Resolving timed out after 10000 milliseconds
error: failed to update core (download library error)
error: failed retrieving file 'extra.db' from mirror.rackspace.com : Resolving timed out after 10000 milliseconds
error: failed retrieving file 'extra.db' from mirror.leaseweb.net : Resolving timed out after 10000 milliseconds
error: failed to update extra (download library error)
error: failed retrieving file 'community.db' from mirror.rackspace.com : Resolving timed out after 10000 milliseconds
error: failed retrieving file 'community.db' from mirror.leaseweb.net : Resolving timed out after 10000 milliseconds
error: failed to update community (download library error)
error: failed to synchronize all databasesUpdate: my ip ad:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: wlo1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether d4:6d:6d:00:12:2a brd ff:ff:ff:ff:ff:ff
inet 192.168.1.107/24 brd 192.168.1.255 scope global dynamic wlo1
valid_lft 9915sec preferred_lft 9915sec
inet6 fe80::d66d:6dff:fe00:122a/64 scope link
valid_lft forever preferred_lft forever
3: eno1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 4c:ed:fb:75:57:da brd ff:ff:ff:ff:ff:ff
4: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether 52:54:00:3f:ee:25 brd ff:ff:ff:ff:ff:ff
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
valid_lft forever preferred_lft forever
5: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel master virbr0 state DOWN group default qlen 1000
link/ether 52:54:00:3f:ee:25 brd ff:ff:ff:ff:ff:ff
6: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 02:42:53:30:a9:6c brd ff:ff:ff:ff:ff:ff
inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
valid_lft forever preferred_lft forever
inet6 fe80::42:53ff:fe30:a96c/64 scope link
valid_lft forever preferred_lft foreverIf I remember exactly, there's time that I success doing building image as above, but I don't think I change network configs.
Last edited by tmpm697 (2019-03-25 14:59:18)
Offline
Seems like it can't connect.. can you ping once of those servers from within the container?
Offline
Seems like it can't connect.. can you ping once of those servers from within the container?
I don't understand your question, the comand: docker build -t arch:latest . trying to build a custom docker image from Dockerfile in `.` - current folder. So there would no container created yet.
b06fe3292fc6 is a temporary container created as result of a new layer. So I can't access it.
Last edited by tmpm697 (2019-03-24 11:00:06)
Offline
I use lxc not docker so perhaps I misunderstood. The core of my question is valid: can you ping one of those servers from whatever environment you're ruining? If yes, I would speculate that the virtual network isn't configured or working properly.
Offline
I can ping them from docker host (my pc):
% ping mirror.rackspace.com
PING mirror.rackspace.com (180.150.156.88) 56(84) bytes of data.
64 bytes from 180.150.156.88 (180.150.156.88): icmp_seq=1 ttl=246 time=53.1 ms
64 bytes from 180.150.156.88 (180.150.156.88): icmp_seq=2 ttl=246 time=52.9 ms
64 bytes from 180.150.156.88 (180.150.156.88): icmp_seq=3 ttl=246 time=53.2 ms
^C
--- mirror.rackspace.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2ms
rtt min/avg/max/mdev = 52.895/53.071/53.193/0.127 ms
% ping mirror.leaseweb.net
PING mirror.fra10.de.leaseweb.net (37.58.58.140) 56(84) bytes of data.
64 bytes from mirror.fra10.de.leaseweb.net (37.58.58.140): icmp_seq=1 ttl=53 time=247 ms
64 bytes from mirror.fra10.de.leaseweb.net (37.58.58.140): icmp_seq=2 ttl=53 time=238 ms
64 bytes from mirror.fra10.de.leaseweb.net (37.58.58.140): icmp_seq=3 ttl=53 time=239 msI also tried to prune all network and re-run, but doesn't help, the same result.
docker network prune
answer: y
Last edited by tmpm697 (2019-03-24 11:21:51)
Offline
I use --debug option with pacman in Dockerfile and this is the result:
---> 337c35b7ef88
Step 2/23 : RUN pacman -Syu --debug --needed --noconfirm sudo which vim tar grep sed awk wget
---> Running in ddca5b5bd32b
debug: pacman v5.1.3 - libalpm v11.0.3
debug: config: attempting to read file /etc/pacman.conf
debug: config: new section 'options'
debug: config: HoldPkg: pacman
debug: config: HoldPkg: glibc
debug: config: arch: x86_64
debug: config: SigLevel: Required
debug: config: SigLevel: DatabaseOptional
debug: config: LocalFileSigLevel: Optional
debug: config: new section 'core'
debug: config file /etc/pacman.conf, line 76: including /etc/pacman.d/mirrorlist
debug: config: new section 'extra'
debug: config file /etc/pacman.conf, line 79: including /etc/pacman.d/mirrorlist
debug: config: new section 'community'
debug: config file /etc/pacman.conf, line 85: including /etc/pacman.d/mirrorlist
debug: config: finished parsing /etc/pacman.conf
debug: setup_libalpm called
debug: option 'logfile' = /var/log/pacman.log
debug: option 'gpgdir' = /etc/pacman.d/gnupg/
debug: option 'hookdir' = /etc/pacman.d/hooks/
debug: option 'cachedir' = /var/cache/pacman/pkg/
debug: registering sync database 'core'
debug: database path for tree core set to /var/lib/pacman/sync/core.db
debug: "/var/lib/pacman/sync/core.db" is not readable: No such file or directory
debug: setting usage of 15 for core repository
debug: adding new server URL to database 'core': https://mirror.rackspace.com/archlinux/core/os/x86_64
debug: adding new server URL to database 'core': https://mirror.leaseweb.net/archlinux/core/os/x86_64
debug: registering sync database 'extra'
debug: database path for tree extra set to /var/lib/pacman/sync/extra.db
debug: "/var/lib/pacman/sync/extra.db" is not readable: No such file or directory
debug: setting usage of 15 for extra repository
debug: adding new server URL to database 'extra': https://mirror.rackspace.com/archlinux/extra/os/x86_64
debug: adding new server URL to database 'extra': https://mirror.leaseweb.net/archlinux/extra/os/x86_64
debug: registering sync database 'community'
debug: database path for tree community set to /var/lib/pacman/sync/community.db
debug: "/var/lib/pacman/sync/community.db" is not readable: No such file or directory
debug: setting usage of 15 for community repository
debug: adding new server URL to database 'community': https://mirror.rackspace.com/archlinux/community/os/x86_64
debug: adding new server URL to database 'community': https://mirror.leaseweb.net/archlinux/community/os/x86_64
:: Synchronizing package databases...
debug: url: https://mirror.rackspace.com/archlinux/core/os/x86_64/core.db
debug: maxsize: 26214400
debug: opened tempfile for download: /var/lib/pacman/sync/core.db.part (wb)
debug: curl returned error 28 from transfer
error: failed retrieving file 'core.db' from mirror.rackspace.com : Resolving timed out after 10000 milliseconds
debug: url: https://mirror.leaseweb.net/archlinux/core/os/x86_64/core.db
debug: maxsize: 26214400
debug: opened tempfile for download: /var/lib/pacman/sync/core.db.part (wb)
debug: curl returned error 28 from transfer
error: failed retrieving file 'core.db' from mirror.leaseweb.net : Resolving timed out after 10000 milliseconds
debug: failed to sync db: download library error
error: failed to update core (download library error)
debug: url: https://mirror.rackspace.com/archlinux/extra/os/x86_64/extra.db
debug: maxsize: 26214400
debug: opened tempfile for download: /var/lib/pacman/sync/extra.db.part (wb)
debug: curl returned error 28 from transfer
error: failed retrieving file 'extra.db' from mirror.rackspace.com : Resolving timed out after 10000 milliseconds
debug: url: https://mirror.leaseweb.net/archlinux/extra/os/x86_64/extra.db
debug: maxsize: 26214400
debug: opened tempfile for download: /var/lib/pacman/sync/extra.db.part (wb)
debug: curl returned error 28 from transfer
error: failed retrieving file 'extra.db' from mirror.leaseweb.net : Resolving timed out after 10001 milliseconds
debug: failed to sync db: download library error
error: failed to update extra (download library error)
debug: url: https://mirror.rackspace.com/archlinux/community/os/x86_64/community.db
debug: maxsize: 26214400
debug: opened tempfile for download: /var/lib/pacman/sync/community.db.part (wb)
debug: curl returned error 28 from transfer
error: failed retrieving file 'community.db' from mirror.rackspace.com : Resolving timed out after 10000 milliseconds
debug: url: https://mirror.leaseweb.net/archlinux/community/os/x86_64/community.db
debug: maxsize: 26214400
debug: opened tempfile for download: /var/lib/pacman/sync/community.db.part (wb)
debug: curl returned error 28 from transfer
error: failed retrieving file 'community.db' from mirror.leaseweb.net : Resolving timed out after 10000 milliseconds
debug: failed to sync db: download library error
error: failed to update community (download library error)
error: failed to synchronize all databases
debug: unregistering database 'local'
debug: unregistering database 'core'
debug: unregistering database 'extra'
debug: unregistering database 'community'Last edited by tmpm697 (2019-03-24 11:28:37)
Offline
my godness, I used nftables but forgot to enable ip forwarding to be able to use docker.
Offline