To run Docker in a Proxmox environment we have two options, create a virtual machine or do it within a container LXC.
In this guide we are going to see how to do it in a container that is much more efficient.
First of all we will have to download the template that we want to use, in my case it will be Debian 12.
Next we will create a container with the downloaded template.
The space will be what we calculate we will need but it can be changed later without any problem.
We select the number of cores and memory available for the container. Like the disk, this can be modified later, even with the container working.
The network configuration will depend on our particular environment. In my case and for this case it will obtain the IP through DHCP and use the DNS defined by the host.
We confirm and check start the container after creating it.
Once the container is started, we will log in as root and it will be advisable to do an "apt update && apt upgrade" to install package updates that are not in the container image.
We will restart the container from the terminal or the web interface in case an update needs it.
To install Docker in this distribution we have two options, use the version that is included in the Debian repositories or use the version provided by the creators of Docker.
The first option is the simplest and will work well for most occasions but we will not have the latest version.
To install it we will have to execute:
# apt install docker.io
Docker will be installed along with its dependencies and we will have it available.
To test it we will launch the classic testing container.
# docker run hello-world
If everything is correct we will see an output similar to the following:
Send feedback Side panels
Comments