Podman
Podman is a daemonless container manager that can run containers as root or in rootless mode. Podman commands are fully compatible with Docker, so you can replace one with the other: alias docker=podman
.
The core Podman runtime environment can only run on Linux operating systems. However, you can use a remote client for other operating systems to manage containers on the machine running Podman. This topic describes how IntelliJ IDEA can act as a remote client for Podman.
This functionality relies on the Docker plugin, which is bundled and enabled in IntelliJ IDEA by default. If the relevant features are not available, make sure that you did not disable the plugin.
note
The Docker plugin is available by default only in IntelliJ IDEA Ultimate. For IntelliJ IDEA Community Edition, you need to install the Docker plugin as described in Install plugins.
Press CtrlAlt0S to open settings and then select Plugins.
Open the Installed tab, find the Docker plugin, and select the checkbox next to the plugin name.
Starting from Podman version 3.2.0, you can use the podman machine
set of commands to run a virtual machine with Podman.
Initialize a new virtual machine:
$podman machine init --rootful=true
For more information, see podman machine init.
Start the Podman virtual machine:
$podman machine start
For more information, see podman machine start.
If successful, the output will contain a URL of the Podman API and the DOCKER_HOST
variable with a value that you can use for connecting to Podman from IntelliJ IDEA or any other Docker client. For example:
unix:///var/folders/3p/qnvz_wss4g32qcwxcmvsk70c0000gp/T/podman/podman-machine-default-api.sock
For information about running Podman, see Run Podman.
Press CtrlAlt0S to open settings and then select Build, Execution, Deployment | Docker.
Click to add a Docker configuration.
Select Podman and in the Podman connection list, select the address of the Podman machine.
If everything is correct, you should see Connection successful at the bottom of the page.
For more information, refer to Docker connection settings.
When the connection to Podman could not be established, an error indicating that the Podman executable was found, but the connection to the Podman socket failed is displayed.
You can refer to Podman documentation for more details and use the following steps to troubleshoot the issue:
Configure the
systemd
socket to start automatically after a reboot and run as the specified user:systemctl --user enable podman.socket loginctl enable-linger <USER>
Start the systemd socket for the service with a root:
sudo systemctl start podman.socket
Configure the socket to be automatically started after the reboot:
sudo systemctl enable podman.socket
note
Note that for Dev Containers to operate stably with Podman, the integration requires the
service_timeout=0
field to be set in thecontainers.conf
file:
this field is mentioned in the Podman System Service documentation under the
--time
,-t
option descriptionthere is a complete specification of the
containers.conf
configuration file.