Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
lima-vm
GitHub Repository: lima-vm/lima
Path: blob/master/website/content/en/docs/examples/containers/podman/_index.md
2639 views
---
title: Podman weight: 3
---

{{< tabpane text=true >}} {{% tab header="Rootless" %}} To use podman command in the VM:

limactl start template://podman limactl shell podman podman run -d --name nginx -p 127.0.0.1:8080:80 docker.io/library/nginx:alpine

To use podman command on the host:

export CONTAINER_HOST=$(limactl list podman --format 'unix://{{.Dir}}/sock/podman.sock') podman --remote run -d --name nginx -p 127.0.0.1:8080:80 docker.io/library/nginx:alpine

To use docker command on the host:

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

{{% /tab %}} {{% tab header="Rootful" %}} To use podman command in the VM:

limactl start template://podman-rootful limactl shell podman-rootful sudo podman run -d --name nginx -p 127.0.0.1:8080:80 docker.io/library/nginx:alpine

To use podman command on the host:

export CONTAINER_HOST=$(limactl list podman-rootful --format 'unix://{{.Dir}}/sock/podman.sock') podman --remote run -d --name nginx -p 127.0.0.1:8080:80 docker.io/library/nginx:alpine

To use docker command on the host:

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

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