Skip to content

Instantly share code, notes, and snippets.

@aureamunoz
Last active June 14, 2021 14:08
Show Gist options
  • Save aureamunoz/fa9c78c3774dddc3c1c0083430da3d15 to your computer and use it in GitHub Desktop.
Save aureamunoz/fa9c78c3774dddc3c1c0083430da3d15 to your computer and use it in GitHub Desktop.
Docker wrong installation Fedora 32

I followed the steps bellow from the official article:

Uninstall old versions/Remove conflicts

 sudo dnf remove docker-*
 sudo dnf config-manager --disable docker-*

Check

 docker version
 -l: /bin/docker: No such file or directory

System preparation

Enable old CGroups

sudo grubby --update-kernel=ALL --args="systemd.unified_cgroup_hierarchy=0"

Whitelist docker in firewall

sudo firewall-cmd --permanent --zone=trusted --add-interface=docker0
Warning: ALREADY_ENABLED: docker0
success
sudo firewall-cmd --permanent --zone=FedoraWorkstation --add-masquerade
Warning: ALREADY_ENABLED: masquerade
success

installing Moby

sudo dnf install moby-engine docker-compose

docker version
Client:
 Version:           19.03.11
 API version:       1.40
 Go version:        go1.14.3
 Git commit:        42e35e6
 Built:             Sun Jun  7 21:16:58 2020
 OS/Arch:           linux/amd64
 Experimental:      false

Server:
 Engine:
  Version:          19.03.11
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.14.3
  Git commit:       42e35e6
  Built:            Sun Jun  7 00:00:00 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.3.3
  GitCommit:
 runc:
  Version:          spec: 1.0.2-dev
  GitCommit:
 docker-init:
  Version:          0.18.0

Restart and test

sudo systemctl enable docker
sudo systemctl reboot
docker run hello-world

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/

Try to create a new cluster with Kind

kind create cluster --name kind-2
Creating cluster "kind-2" ...
ERROR: failed to create cluster: failed to ensure docker network: command "docker network create -d=bridge -o com.docker.network.bridge.enable_ip_masquerade=true -o com.docker.network.driver.mtu=1500 --ipv6 --subnet fc00:f853:ccd:e793::/64 kind" failed with error: exit status 1
Command Output: Error response from daemon: cannot create network 8ba351f803c1b6f7b574c551484b671049ad8a7302cf99497b7e425bcd575c36 (br-8ba351f803c1): conflicts with network 43d4628c6646e00b9d1e65cb478be9285eeb487290909c2a91a6ee40deaf887e (br-43d4628c6646): networks have overlapping IPv6
sudo systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
     Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2021-06-14 12:47:17 CEST; 7min ago
       Docs: man:firewalld(1)
   Main PID: 1163 (firewalld)
      Tasks: 4 (limit: 38296)
     Memory: 41.3M
     CGroup: /system.slice/firewalld.service
             └─1163 /usr/bin/python3 -s /usr/sbin/firewalld --nofork --nopid

Jun 14 12:47:27 auri.redhat firewalld[1163]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -D FORWARD -i docker0 -o docker0 -j DROP' failed: iptables: Bad rule (does a matching rule exi>
Jun 14 12:52:47 auri.redhat firewalld[1163]: WARNING: ALREADY_ENABLED: docker0
Jun 14 12:53:26 auri.redhat firewalld[1163]: WARNING: ALREADY_ENABLED: docker0
Jun 14 12:53:31 auri.redhat firewalld[1163]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -D FORWARD -i br-43d4628c6646 -o br-43d4628c6646 -j DROP' failed: iptables: Bad rule (does a m>
Jun 14 12:53:31 auri.redhat firewalld[1163]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -D FORWARD -i br-96071ad5646c -o br-96071ad5646c -j DROP' failed: iptables: Bad rule (does a m>
Jun 14 12:53:31 auri.redhat firewalld[1163]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -D FORWARD -i docker0 -o docker0 -j DROP' failed: iptables: Bad rule (does a matching rule exi>
Jun 14 12:53:31 auri.redhat firewalld[1163]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -D FORWARD -i br-da250afc4a55 -o br-da250afc4a55 -j DROP' failed: iptables: Bad rule (does a m>
Jun 14 12:53:31 auri.redhat firewalld[1163]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -D FORWARD -i br-100121123e7d -o br-100121123e7d -j DROP' failed: iptables: Bad rule (does a m>
Jun 14 12:53:31 auri.redhat firewalld[1163]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -D FORWARD -i br-13af43f708aa -o br-13af43f708aa -j DROP' failed: iptables: Bad rule (does a m>
Jun 14 12:53:31 auri.redhat firewalld[1163]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -D FORWARD -i docker0 -o docker0 -j DROP' failed: iptables: Bad rule (does a matching rule exi>
lines 1-20/20 (END)

Test stopping the firewalld

sudo systemctl stop firewalld
12:56:38 ~$ sudo systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
     Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
     Active: inactive (dead) since Mon 2021-06-14 12:56:38 CEST; 3s ago
       Docs: man:firewalld(1)
    Process: 1163 ExecStart=/usr/sbin/firewalld --nofork --nopid $FIREWALLD_ARGS (code=exited, status=0/SUCCESS)
   Main PID: 1163 (code=exited, status=0/SUCCESS)

Jun 14 12:53:31 auri.redhat firewalld[1163]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -D FORWARD -i br-43d4628c6646 -o br-43d4628c6646 -j DROP' failed: iptables: Bad rule (does a m>
Jun 14 12:53:31 auri.redhat firewalld[1163]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -D FORWARD -i br-96071ad5646c -o br-96071ad5646c -j DROP' failed: iptables: Bad rule (does a m>
Jun 14 12:53:31 auri.redhat firewalld[1163]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -D FORWARD -i docker0 -o docker0 -j DROP' failed: iptables: Bad rule (does a matching rule exi>
Jun 14 12:53:31 auri.redhat firewalld[1163]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -D FORWARD -i br-da250afc4a55 -o br-da250afc4a55 -j DROP' failed: iptables: Bad rule (does a m>
Jun 14 12:53:31 auri.redhat firewalld[1163]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -D FORWARD -i br-100121123e7d -o br-100121123e7d -j DROP' failed: iptables: Bad rule (does a m>
Jun 14 12:53:31 auri.redhat firewalld[1163]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -D FORWARD -i br-13af43f708aa -o br-13af43f708aa -j DROP' failed: iptables: Bad rule (does a m>
Jun 14 12:53:31 auri.redhat firewalld[1163]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -D FORWARD -i docker0 -o docker0 -j DROP' failed: iptables: Bad rule (does a matching rule exi>
Jun 14 12:56:37 auri.redhat systemd[1]: Stopping firewalld - dynamic firewall daemon...
Jun 14 12:56:38 auri.redhat systemd[1]: firewalld.service: Succeeded.
Jun 14 12:56:38 auri.redhat systemd[1]: Stopped firewalld - dynamic firewall daemon.

Test Docker Hello World

12:56:49 ~$ docker run hello-world

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/

Kind cluster creation is still KO

12:56:55 ~$ kind create cluster --name kind-2
Creating cluster "kind-2" ...
ERROR: failed to create cluster: failed to ensure docker network: command "docker network create -d=bridge -o com.docker.network.bridge.enable_ip_masquerade=true -o com.docker.network.driver.mtu=1500 --ipv6 --subnet fc00:f853:ccd:e793::/64 kind" failed with error: exit status 1
Command Output: Error response from daemon: cannot create network 1a9ed4dd3cf96855b69e4c1eaca10bcebeabe35cd5e4bdef3081f2c3ecee4566 (br-1a9ed4dd3cf9): conflicts with network 43d4628c6646e00b9d1e65cb478be9285eeb487290909c2a91a6ee40deaf887e (br-43d4628c6646): networks have overlapping IPv6

@aureamunoz
Copy link
Author

Parce que je voulais revenir en arriere et c etait ce qu'ils disait dans l'article officiel: https://fedoramagazine.org/docker-and-fedora-32/

@cmoulliard
Copy link

Tu as un problème qui n'est pas le même que la semaine dernière This error means docker was unable to listen with ipv6 on the host's loopback ("localhost") address.

https://unix.stackexchange.com/questions/327657/how-to-enable-ipv6-on-the-loopback-device

@cmoulliard
Copy link

cmoulliard commented Jun 14, 2021

Peux- tu executer cette commande ip -6 addr et regarder le network ipv6 qui est assigné aux différents interfaces ?

@aureamunoz
Copy link
Author

ip -6 addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 state UNKNOWN qlen 1000
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
4: wlp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
    inet6 fe80::f279:e3b3:3d27:c793/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
5: br-43d4628c6646: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 state DOWN 
    inet6 fc00:f853:ccd:e793::1/64 scope global tentative 
       valid_lft forever preferred_lft forever
    inet6 fe80::1/64 scope link tentative 
       valid_lft forever preferred_lft forever
7: docker0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP 
    inet6 fe80::42:8aff:fea2:df42/64 scope link 
       valid_lft forever preferred_lft forever
12: veth29a1ca3@if11: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP 
    inet6 fe80::9856:ffff:fef3:605d/64 scope link 
       valid_lft forever preferred_lft forever

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment