prerequisites:

https://balaskas.gr/wiki/docker/ipv6

docker-compose.yml


An alternative file name:

ping6_busybox.yml

version: '2.1'

services:
  ping6google:
    image: busybox
    command: ping6 -c6 google.com
    networks:
            testing:

networks:
  testing:
    driver: bridge
    enable_ipv6: true
    ipam:
      driver: default

Docker Compose Up


%%

$ docker-compose -f ping6_busybox.yml up

Starting lab_ping6google_1 ...
Starting lab_ping6google_1 ... done
Attaching to lab_ping6google_1
ping6google_1 | PING google.com (2a00:1450:4013:c00::64): 56 data bytes
ping6google_1 | 64 bytes from 2a00:1450:4013:c00::64: seq=0 ttl=45 time=33.684 ms
ping6google_1 | 64 bytes from 2a00:1450:4013:c00::64: seq=1 ttl=45 time=34.130 ms
ping6google_1 | 64 bytes from 2a00:1450:4013:c00::64: seq=2 ttl=45 time=37.579 ms
ping6google_1 | 64 bytes from 2a00:1450:4013:c00::64: seq=3 ttl=45 time=34.362 ms
ping6google_1 | 64 bytes from 2a00:1450:4013:c00::64: seq=4 ttl=45 time=37.295 ms
ping6google_1 | 64 bytes from 2a00:1450:4013:c00::64: seq=5 ttl=45 time=35.890 ms
ping6google_1 |
ping6google_1 |
google.com ping statistics
ping6google_1 | 6 packets transmitted, 6 packets received, 0% packet loss
ping6google_1 | round-trip min/avg/max = 33.684/35.490/37.579 ms
lab_ping6google_1 exited with code 0