Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Docker CE installation instructions page #641

Merged
merged 3 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
** xref:proxy.adoc[Proxied Internet Access]
** xref:sysconfig-setting-keymap.adoc[Setting Keyboard Layout]
** xref:os-extensions.adoc[Adding OS extensions]
** xref:docker-ce.adoc[Installing Docker CE]
** xref:customize-nic.adoc[How to Customize a NIC Name]
** xref:sysconfig-configure-swaponzram.adoc[Configuring SwapOnZRAM]
** xref:sysconfig-configure-wireguard.adoc[Configuring WireGuard]
Expand Down
60 changes: 60 additions & 0 deletions modules/ROOT/pages/docker-ce.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
= Installing Docker CE

By default, Fedora CoreOS comes with out-of-the-box support for `docker` CLI (as provided via https://mobyproject.org/[Moby]).
However, in some cases Docker Community Edition (CE) may be preferred for various reasons.
This page explains how to replace the provided version with the latest from the upstream Docker sources.

The recommended approach from the official https://docs.docker.com/engine/install/fedora/[Docker documentation] is to add the Docker repository to your system.
You can then install and update Docker CE from this repository.


== Installing Docker CE on first boot
travier marked this conversation as resolved.
Show resolved Hide resolved

On provisioning, you can install Docker CE during the first boot of the system via ignition configuration.

.Example Butane config for setting up Docker CE
[source,yaml,subs="attributes"]
----
variant: fcos
version: {butane-latest-stable-spec}
systemd:
units:
# Install Docker CE
- name: rpm-ostree-install-docker-ce.service
enabled: true
contents: |
[Unit]
Description=Install Docker CE
Wants=network-online.target
After=network-online.target
Before=zincati.service
ConditionPathExists=!/var/lib/%N.stamp

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/curl --output-dir "/etc/yum.repos.d" --remote-name https://download.docker.com/linux/fedora/docker-ce.repo
ExecStart=/usr/bin/rpm-ostree override remove moby-engine containerd runc --install docker-ce
ExecStart=/usr/bin/touch /var/lib/%N.stamp
ExecStart=/usr/bin/systemctl --no-block reboot

[Install]
WantedBy=multi-user.target
----


== Installing Docker CE on a running system

First, download and setup the Docker repository.
Then you need to remove `moby-engine` and several other conflicting packages that ship by default in the Fedora CoreOS image, install the necessary Docker CE packages, and reboot the system.

[source, bash]
----
curl --remote-name https://download.docker.com/linux/fedora/docker-ce.repo
sudo install --owner 0 --group 0 --mode 644 docker-ce.repo /etc/yum.repos.d/docker-ce.repo
sudo rpm-ostree override remove moby-engine containerd runc --install docker-ce --reboot
----

=== Upgrading Docker CE

Docker CE should be upgraded automatically with each new release of Fedora CoreOS.
Loading