GoLand 2024.3 Help

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 GoLand can act as a remote client for Podman.

Enable the Docker plugin

This functionality relies on the Docker plugin, which is bundled and enabled in GoLand by default. If the relevant features are not available, make sure that you did not disable the plugin.

  1. Press Ctrl+Alt+S to open settings and then select Plugins.

  2. Open the Installed tab, find the Docker plugin, and select the checkbox next to the plugin name.

Run Podman

Starting from Podman version 3.2.0, you can use the podman machine set of commands to run a virtual machine with Podman.

  1. Install Podman.

  2. Initialize a new virtual machine:

    podman machine init --rootful=true

    For more information, see podman machine init.

  3. 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 GoLand or any other Docker client. For example:

unix:///var/folders/3p/qnvz_wss4g32qcwxcmvsk70c0000gp/T/podman/podman-machine-default-api.sock

Connect to Podman from GoLand

Because the Podman API is identical to the Docker Engine API, you can connect GoLand to the Podman service via TCP like you would connect to a Docker Engine API. For information about running Podman, see Run Podman.

  1. Press Ctrl+Alt+S to open settings and then select Build, Execution, Deployment | Docker.

  2. Click The Add button to add a Docker configuration.

  3. Select TCP socket and specify the Podman API service URL in Engine API URL.

    If everything is correct, you should see Connection successful at the bottom of the page.

For more information, refer to Docker connection settings.

GoLand provides only basic support for Podman. If something doesn't work or not as you would expect, file an issue on YouTrack. To see all existing issues related to Podman support, filter by tag:podman.

Last modified: 08 October 2024