How to install docker on guix

Hey guys.

Lately a server I use has been migrated to the /guix/ system

And I wanted to install and use docker, however, I saw that it is a bit of work (not just installing the package)

Could someone who has knowledge in guix help me how to install from scratch?

I would really appreciate it and help a life hahaha

To install Docker on Guix, you will need to perform a few additional steps beyond simply installing the package. Here are the steps you can follow:

  1. Install the Guix package manager if it is not already installed on your system.

  2. Install the “docker-cli” package using the Guix package manager. This can be done by running the following command in the terminal:

guix install docker-cli

  1. Next, you will need to configure the Docker daemon to run on your system. This involves creating a systemd service file for Docker. You can create this file by running the following command:

sudo mkdir /etc/systemd/system/docker.service.d
sudo nano /etc/systemd/system/docker.service.d/guix.conf

  1. In the text editor, add the following lines to the “guix.conf” file:

[Service]
ExecStart=
ExecStart=/var/guix/profiles/per-user/root/current-profile/bin/dockerd

  1. Save and close the file.

  2. Reload the systemd configuration by running the following command:

sudo systemctl daemon-reload

  1. Finally, start the Docker daemon by running the following command:

sudo systemctl start docker

At this point, you should be able to use Docker on your Guix system. You can verify that Docker is running correctly by running the following command:

docker version

This should display information about the Docker client and server versions. If you encounter any issues, you can check the Docker logs by running:

sudo journalctl -u docker.service

I hope this helps you get Docker up and running on your Guix system.