Skip to content

Commit

Permalink
docs: apply suggestions
Browse files Browse the repository at this point in the history
Signed-off-by: Fabrice Flore-Thébault <[email protected]>
  • Loading branch information
themr0c committed Aug 28, 2023
1 parent 51ab06f commit b4589ee
Showing 1 changed file with 35 additions and 6 deletions.
41 changes: 35 additions & 6 deletions website/docs/migrating-from-docker/using-podman-mac-helper.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 **<icon icon="fa-solid fa-cog" size="lg" /> Settings > Resources**, and in the Podman tile, click <icon icon="fa-solid fa-repeat" size="lg" />.
1. Restart your Podman machine: go to **<icon icon="fa-solid fa-cog" size="lg" /> Settings > Resources**, and in the Podman tile, click <icon icon="fa-solid fa-repeat" size="lg" />.

#### Verification

Expand All @@ -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)

0 comments on commit b4589ee

Please sign in to comment.