Back to Lima

Docker

website/content/en/docs/examples/containers/docker/_index.md

2.1.1521 B
Original Source

{{< tabpane text=true >}} {{% tab header="Rootless" %}}

bash
limactl start template:docker
export DOCKER_HOST=$(limactl list docker --format 'unix://{{.Dir}}/sock/docker.sock')
docker run -d --name nginx -p 127.0.0.1:8080:80 nginx:alpine

{{% /tab %}} {{% tab header="Rootful" %}}

bash
limactl start template:docker-rootful
export DOCKER_HOST=$(limactl list docker-rootful --format 'unix://{{.Dir}}/sock/docker.sock')
docker run -d --name nginx -p 127.0.0.1:8080:80 nginx:alpine

{{% /tab %}} {{< /tabpane >}}