Desculpe, não sei se isso é um problema do Docker ou do DIG no RockyLinux 9. Tudo funciona como esperado no RockyLinux 8.
Tenho um docker-compose.yml
arquivo abaixo com um serviço chamado https
. Isso permite que o contêiner seja referenciado pelo nome do host https
. Enquanto ping https
funciona, por algum motivo dig https
( DiG 9.16.23-RH
) não funciona no rockylinux 9. Funciona no rockylinux 8 ( DiG 9.11.36-RedHat-9.11.36-16.el8_10.2
). Se eu mudar o nome do serviço para httpsx
então dig httpsx
funciona.
services:
https:
image: "rockylinux:${RL_VERSION}"
command: bash -c "yum install -y iputils bind-utils && echo '=====dig version output====' && dig -v && echo '=====ping https output====' && ping -c 3 https && echo '=====dig https output====' && dig +short https"
environment:
- RL_VERSION
Trabalhando 8:
% RL_VERSION=8 docker-compose up
Attaching to https-1
https-1 | Rocky Linux 8 - AppStream 5.7 MB/s | 11 MB 00:01
...
https-1 | Complete!
https-1 | =====dig version output====
https-1 | DiG 9.11.36-RedHat-9.11.36-16.el8_10.2
https-1 | =====ping https output====
https-1 | PING https (172.21.0.2) 56(84) bytes of data.
https-1 | 64 bytes from c3f0c7a6613c (172.21.0.2): icmp_seq=1 ttl=64 time=0.558 ms
https-1 | 64 bytes from c3f0c7a6613c (172.21.0.2): icmp_seq=2 ttl=64 time=0.051 ms
https-1 | 64 bytes from c3f0c7a6613c (172.21.0.2): icmp_seq=3 ttl=64 time=0.040 ms
https-1 |
https-1 | --- https ping statistics ---
https-1 | 3 packets transmitted, 3 received, 0% packet loss, time 2025ms
https-1 | rtt min/avg/max/mdev = 0.040/0.216/0.558/0.241 ms
https-1 | =====dig https output====
https-1 | 172.21.0.2
Falha 9:
% RL_VERSION=9 docker-compose up
[+] Running 1/1
✔ Container testhttps-https-1 Recreated 0.2s
Attaching to https-1
https-1 | Rocky Linux 9 - BaseOS 2.4 MB/s | 2.4 MB 00:00
...
https-1 | Complete!
https-1 | =====dig version output====
https-1 | DiG 9.16.23-RH
https-1 | =====ping https output====
https-1 | PING https (172.21.0.2) 56(84) bytes of data.
https-1 | 64 bytes from 4a2841b5dac9 (172.21.0.2): icmp_seq=1 ttl=64 time=0.404 ms
https-1 | 64 bytes from 4a2841b5dac9 (172.21.0.2): icmp_seq=2 ttl=64 time=0.117 ms
https-1 | 64 bytes from 4a2841b5dac9 (172.21.0.2): icmp_seq=3 ttl=64 time=0.088 ms
https-1 |
https-1 | --- https ping statistics ---
https-1 | 3 packets transmitted, 3 received, 0% packet loss, time 2009ms
https-1 | rtt min/avg/max/mdev = 0.088/0.203/0.404/0.142 ms
https-1 | =====dig https output====
https-1 | c.root-servers.net.
https-1 | l.root-servers.net.
https-1 | e.root-servers.net.
https-1 | d.root-servers.net.
https-1 | i.root-servers.net.
https-1 | b.root-servers.net.
https-1 | g.root-servers.net.
https-1 | m.root-servers.net.
https-1 | a.root-servers.net.
https-1 | f.root-servers.net.
https-1 | h.root-servers.net.
https-1 | j.root-servers.net.
https-1 | k.root-servers.net.