From b4589eec0aae14392e9f41c47cd912aa4ac67959 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20Flore-Th=C3=A9bault?= Date: Mon, 28 Aug 2023 11:22:03 +0200 Subject: [PATCH] docs: apply suggestions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabrice Flore-Thébault --- .../using-podman-mac-helper.md | 41 ++++++++++++++++--- 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/website/docs/migrating-from-docker/using-podman-mac-helper.md b/website/docs/migrating-from-docker/using-podman-mac-helper.md index a19c2e85e6388..8e458774d6c27 100644 --- a/website/docs/migrating-from-docker/using-podman-mac-helper.md +++ b/website/docs/migrating-from-docker/using-podman-mac-helper.md @@ -22,16 +22,21 @@ The service redirects `/var/run/docker` to the fixed user-assigned UNIX socket l - macOS - [Podman](../Installation/macos-install) - Docker service is [paused](https://docs.docker.com/desktop/use-desktop/pause/) and [_Start Docker Desktop when you log in_ is disabled](https://docs.docker.com/desktop/settings/mac/), or Docker is [uninstalled](https://docs.docker.com/desktop/uninstall/). +- The Docker CLI is using the default Docker socket. + + ```docker context list + + ``` #### Procedure -1. To set up the `podman-mac-helper` service: run the command in a terminal: +1. Set up the `podman-mac-helper` service: run the command in a terminal: ```shell-session sudo podman-mac-helper install ``` -1. To restart your Podman machine: go to ** Settings > Resources**, and in the Podman tile, click . +1. Restart your Podman machine: go to ** Settings > Resources**, and in the Podman tile, click . #### Verification @@ -41,17 +46,41 @@ The service redirects `/var/run/docker` to the fixed user-assigned UNIX socket l $ ls -la /var/run/docker.sock ``` -2. The `docker` CLI communicates with the Podman socket. + The output points to a `podman.sock` file such as: + + ```shell-session + /var/run/docker.sock -> /Users/username/.local/share/containers/podman/machine/podman.sock + ``` + +1. When you query the Docker socket, you receive replies from Podman rather than Docker. + + For instance, this command outputs Podman version rather that Docker version: + + ```shell-session + $ curl -s --unix-socket /var/run/docker.sock "http://v1.41/info" | jq -r .ServerVersion + ``` + +1. Your tools communicating to the Docker socket, such as [Maven](https://maven.apache.org/) or [Testcontainers](https://www.testcontainers.org/), communicate with Podman without reconfiguration. + +1. (Optionally, if the `docker` CLI is installed) The `docker` CLI communicates with the Podman socket. + Therefore this command outputs Podman version rather that Docker version: ```shell-session $ DOCKER_HOST=unix:///var/run/docker.sock docker info --format=json | jq -r .ServerVersion ``` -3. Your tools communicating to the Docker socket, such as [Maven](https://maven.apache.org/) or [Testcontainers](https://www.testcontainers.org/), communicate with Podman without reconfiguration. +1. (Optionally, if the `docker` CLI is installed) The docker CLI context is set to the default value `unix:///var/run/docker.sock`: + + ```shell-session + $ docker context + ``` + + ``` + NAME TYPE DESCRIPTION DOCKER ENDPOINT KUBERNETES ENDPOINT ORCHESTRATOR + default * moby Current DOCKER_HOST based configuration unix:///var/run/docker.sock + ``` #### Additional resources - [`podman-mac-helper` source](https://github.com/containers/podman/tree/main/cmd/podman-mac-helper) -- [`docker save` reference documentation](https://docs.docker.com/engine/reference/commandline/save/) -- [`podman import` reference documentation](https://docs.podman.io/en/latest/markdown/podman-import.1.html)