for-linux icon indicating copy to clipboard operation
for-linux copied to clipboard

Please provide repo for docker-ce on Fedora 32

Open hhlp opened this issue 6 years ago • 140 comments

  • [ ] This is a bug report
  • [x] This is a feature request
  • [x] I searched existing issues before opening this one

The Docker-CE Fedora repository is the recommend way to install recommended way. It has many benefits over installing from a package or any other method.

Fedora also releases a new version every six months. The Fedora repository also takes a very long time to become ready after the release of a new version, with many issues being opened after each recent Fedora is release.

Fedora has officially branched Version 32 February 11/2020 and might have a beta release on March 17/2020.

I'm filing this issue to hopefully put this task on the radar, so that there might be a repository set up in time for the Fedora 32 release cycle....

NOTE

Some of us migrate when the beta version is ready so we have to disable the repository and wait for it to be ready

Release Schedule: https://fedorapeople.org/groups/schedule/f-32/f-32-key-tasks.html

Regards.,

hhlp avatar Mar 16 '20 17:03 hhlp

@Frosthage use docker stack:

# install
dnf install moby-engine
# remove live-resotore line
vim /etc/sysconfig/docker
# enable and start docker
systemctl enable --now docker
# create one node swarm cluster
docker swarm init
# delpoy
docker stack deploy -c docker-compose.yml redis

Tested on clean f32 just right now, for you <3

lexfrei avatar May 13 '20 17:05 lexfrei

How? My google fu is failing me. :/

I don't remember any specific docker-compose related hacks. I think all I had to do (F32) was:

  • grubby --update-kernel=ALL --args="systemd.unified_cgroup_hierarchy=0"
  • firewall-cmd --permanent --zone=FedoraWorkstation --add-masquerade
  • dnf install moby-engine docker-compose
  • systemctl enable docker
  • reboot

And docker-compose build & docker-compose up work with my docker-compose.yml

jpopelka avatar May 14 '20 06:05 jpopelka

@lexfrei @jpopelka Thanks heaps!

Frosthage avatar May 14 '20 19:05 Frosthage

In addition to the steps people have listed above, I also had a br-<ugly-hash> interface that I had to set as trusted before my docker containers were able to talk to each other. Found it by running firewall-config.

sparish-xevo avatar May 15 '20 19:05 sparish-xevo

Is there any ETA on an official Fedora 32 repo?

navjotjsingh avatar May 19 '20 01:05 navjotjsingh

After reading this and the commentary here I read the following: https://developers.redhat.com/blog/2019/02/21/podman-and-buildah-for-docker-users/

Installed podman and all issues disapeared. Really don't want to be maintaining kernel options - otherwise I'd be running Gentoo again

rhubarbselleven avatar May 20 '20 07:05 rhubarbselleven

Really don't want to be maintaining kernel options

I guess you are talking about the kernel option for using cgroups v1. That's only temporary since the Docker team are working on adding support for cgroups v2: https://github.com/opencontainers/runc/issues/2315

vincent-olivert-riera avatar May 20 '20 08:05 vincent-olivert-riera

Yeah but when this is all done and dusted - I'm not going to remember to go and undo all of that

rhubarbselleven avatar May 20 '20 08:05 rhubarbselleven

I'm not going to remember to go and undo all of that

Sounds like you need some configuration management in a git history with comments.

I am have the feeling that redhat/fedora want to push buildah cause on Debian/Ubuntu I never need to change any kernel options.

SuperSandro2000 avatar May 20 '20 16:05 SuperSandro2000

I have upgraded my Fedora 31 workstation to Fedora 32. Here are some issues I've experienced with Docker (most of them have been reported by other people above, but I'm trying to give some details).

1.) Since Fedora 31 cgroups v2 is enabled by default. To be able to run Docker you need to revert to cgroups v1 by setting a parameter in the kernel cmdline. (Not a bug, just mentioning it for completeness).

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

2.) There is no Fedora 32 repo for Docker, so updates fail. (I had Docker already installed on Fedora 31).

$ dnf repolist docker-ce-stable --verbose
error: Status code: 404 for http://linux.dropbox.com/fedora/32/repodata/repomd.xml (IP: 13.35.253.112) (http://linux.dropbox.com/fedora/32/repodata/repomd.xml).

3.) there's an iptables issue. From inside a Docker container pinging any destination works. However, tcp/udp connections don't work (i.e. the local DNS server set by Docker in the container can only be pinged, but not reached on the DNS service).

journalctl -t firewalld shows these errors after booting:

firewalld[854]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -t filter -F DOCKER' failed: iptables: No chain/target/match by that name.
firewalld[854]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -t filter -X DOCKER' failed: iptables: No chain/target/match by that name.
firewalld[854]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -t filter -F DOCKER-ISOLATION-STAGE-1' failed: iptables: No chain/target/match by that name.
firewalld[854]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -t filter -X DOCKER-ISOLATION-STAGE-1' failed: iptables: No chain/target/match by that name.
firewalld[854]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -t filter -F DOCKER-ISOLATION-STAGE-2' failed: iptables: No chain/target/match by that name.
firewalld[854]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -t filter -X DOCKER-ISOLATION-STAGE-2' failed: iptables: No chain/target/match by that name.
firewalld[854]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -t filter -F DOCKER-ISOLATION' failed: iptables: No chain/target/match by that name.
firewalld[854]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -t filter -X DOCKER-ISOLATION' failed: iptables: No chain/target/match by that name.
firewalld[854]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -D FORWARD -i docker0 -o docker0 -j DROP' failed: iptables: Bad rule (does a matching rule exist in that chain?).
firewalld[854]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -D FORWARD -i docker0 -o docker0 -j DROP' failed: iptables: Bad rule (does a matching rule exist in that chain?).

As someone mentioned above, adding the Docker interface to the trusted firewall zone is a quick workaround:

firewall-cmd --permanent --zone=trusted --add-interface=docker0
firewall-cmd --reload

I had this same issue and i wasn't able to ping anything within a container, I've fixed it with :

firewall-cmd --get-zone-of-interface=enp1s0
   FedoraWorkstation

firewall-cmd --zone=FedoraWorkstation --add-masquerade --permanent

firewall-cmd --reload

My fix involved both of these solutions.

Fix the c group issue

dnf install grubby grubby --update-kernel=ALL --args="systemd.unified_cgroup_hierarchy=0" reboot

fix the first docker network issue (internet connection)

firewall-cmd --permanent --zone=trusted --add-interface=docker0; firewall-cmd --reload;

fix the second docker network issue (communication between containers)

Find your network interface ip addr # Example: mine was ens33 with altname enp2s1

Additional step to assign a zone to my interface

firewall-cmd --get-default-zone FedoraWorkstation firewall-cmd --get-zone-of-interface=ens33 no zone firewall-cmd --get-zone-of-interface=enp2s1 no zone firewall-cmd --permanent --zone=FedoraWorkstation--add-interface=ens33; firewall-cmd --permanent --zone=FedoraWorkstation --add-interface=enp2s1;

firewall-cmd --zone=FedoraWorkstation --add-masquerade --permanent firewall-cmd --reload

Now everything seems to be working correctly. Thanks for the help.

N-ickJones avatar May 20 '20 19:05 N-ickJones

@N-ickJones what version of docker are you on now? docker --version docker-compose --version

gregmartyn avatar May 21 '20 15:05 gregmartyn

@N-ickJones what version of docker are you on now? docker --version docker-compose --version

Hey Greg,

This is the output for those two commands:

Docker version 19.03.9, build 9d98839 docker-compose version 1.25.4, build unknown

N-ickJones avatar May 21 '20 19:05 N-ickJones

There is a new zone, libvirt, that can be used so you don't modify your default FedoraWorkstation zone. It fixed my issues after upgrade.

[jon@dahome ~]$ sudo firewall-cmd --permanent --zone=FedoraWorkstation --add-interface=docker0
The interface is under control of NetworkManager, setting zone to 'FedoraWorkstation'.
success
[jon@dahome ~]$ docker run -it alpine /usr/bin/nslookup github.com 1.1.1.1
nslookup: write to '1.1.1.1': Host is unreachable
;; connection timed out; no servers could be reached

[jon@dahome ~]$ sudo firewall-cmd --permanent --zone=libvirt --add-interface=docker0
The interface is under control of NetworkManager, setting zone to 'libvirt'.
success
[jon@dahome ~]$ docker run -it alpine /usr/bin/nslookup github.com 1.1.1.1
Server:		1.1.1.1
Address:	1.1.1.1:53

Non-authoritative answer:
Name:	github.com
Address: 140.82.112.3

damaestro avatar May 22 '20 23:05 damaestro

There is a new zone, libvirt, that can be used so you don't modify your default FedoraWorkstation zone. It fixed my issues after upgrade.

https://bugzilla.redhat.com/show_bug.cgi?id=1817022 seems to have much more detail and gives a few options. I seem to have issues with some internal connections still, but I was able to get general network access working using the new zone. It might also be a completely unrelated upgrade issue that I've not found yet.

damaestro avatar May 23 '20 00:05 damaestro

I also need the Docker packages for Fedora 32 x86_64.

rforberger avatar May 26 '20 09:05 rforberger

I also need the Docker packages for Fedora 32 x86_64.

For now (as a workaround) you can edit the repository file and install the version for fedora 31.

Replace $releasever with 31 in /etc/yum.repos.d/docker-ce.repo

nlzet avatar May 26 '20 11:05 nlzet

Thanks @nlzet

I know about the workaround, but don't want to apply it, since I will have to switch back to the $releasever variable, once packages for Fedora 32 come available.

rforberger avatar May 26 '20 14:05 rforberger

docker: Error response from daemon: cgroups: cgroup mountpoint does not exist: unknown.

Anyone seeing this error?

yrsurya avatar May 27 '20 04:05 yrsurya

The latest version of the moby-engine package pushed to Fedora 32 repo (19.03.8-2.ce.gitafacb8b.fc32) now provides its own docker zone out of the box that docker0 is assigned to:

$ firewall-cmd --get-active-zones
FedoraWorkstation
  interfaces: wlp2s0
docker
  interfaces: docker0
libvirt
  interfaces: virbr0

So no more need to tinker around moving it to trusted / libvirt zone.

However this still wasn't enough to allow didn't get my web container to communicate with my db container specified in my docker-compose. I still had to additionally run:

# probably want to run this with --permanent
$ firewall-cmd --zone=FedoraWorkstation --add-masquerade

philbates35 avatar May 27 '20 11:05 philbates35

I had this same issue and i wasn't able to ping anything within a container, I've fixed it with :

firewall-cmd --get-zone-of-interface=enp1s0
   FedoraWorkstation

firewall-cmd --zone=FedoraWorkstation --add-masquerade --permanent

firewall-cmd --reload

It's a workaround, works for individual containers but seems it has problems while you're trying to create a network of containers...

Masquerading forces container [A] to be identified as 'gateway' by container [B], staying both containers connected to same network...

I'm still searching for a solution...

fbsanchez avatar Jun 01 '20 09:06 fbsanchez