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 requirements to support Docker in runtime #261

Merged
merged 1 commit into from
Feb 3, 2023
Merged

Add requirements to support Docker in runtime #261

merged 1 commit into from
Feb 3, 2023

Conversation

hoh
Copy link
Member

@hoh hoh commented Jan 31, 2023

No description provided.

@hoh hoh requested a review from nesitor January 31, 2023 16:59
@hoh hoh marked this pull request as ready for review January 31, 2023 17:00
@hoh hoh changed the title WIP: Add support for Docker in runtime Add support for Docker in runtime Feb 1, 2023
@hoh hoh changed the title Add support for Docker in runtime Add requirements to support Docker in runtime Feb 1, 2023
cgroupfs-mount
update-alternatives --set iptables /usr/sbin/iptables-legacy
update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
echo '{\n"storage-driver": "overlay2"\n}\n' > /etc/docker/daemon.json
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For our actual indexers, we need to have it in vfs I think.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thought, I believe forcing use of overlay might lead to unpredictable behavior as not all systems are compatible. Overlay2 is the de facto storage driver so it would not be needed.

Here is the storage driver preference order detection:

Linux distribution Recommended storage drivers Alternative drivers
Ubuntu overlay2 overlay¹, devicemapper², aufs³, zfs, vfs
Debian overlay2 overlay¹, devicemapper², aufs³, vfs
CentOS overlay2 overlay¹, devicemapper², zfs, vfs
Fedora overlay2 overlay¹, devicemapper², zfs, vfs
SLES 15 overlay2 overlay¹, devicemapper², vfs
RHEL overlay2 overlay¹, devicemapper², vfs

The vfs storage driver is usually not the best choice, and primarily intended for debugging purposes in situations where no other storage-driver is supported.

Although not the most performant, vfs is the most compatible one.

https://docs.docker.com/storage/storagedriver/select-storage-driver/

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VFS works everywhere but it copies everything when a user creates a container from an image, duplicating the entire storage.

Forcing the storage driver makes Docker fail instead of switching to VFS without notice.

The only issue with overlay2 inside VMs is that it cannot run on top of another overlay filesystem, which is the case for / in the runtime.

I will remove that line from this so we can discuss it further in another issue / topic.

Solution: Mount cgroups, configure iptables and install dependencies
@hoh hoh merged commit c8a2e43 into main Feb 3, 2023
@Psycojoker Psycojoker deleted the hoh-docker branch July 24, 2024 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants