Skip to content

podman: use connection instead of CONTAINER_HOST #644

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 11, 2022

Conversation

afbjorklund
Copy link
Member

@afbjorklund afbjorklund commented Feb 11, 2022

Sync the podman example, with the docker example.

Copy the example changes that were sneaked into:

commit 1e45f78

Note: using the environment variables still works just fine, so they are left in the comments.

Also using the new podman example, instead of running a docker example which was confusing.

https://en.wikipedia.org/wiki/Let%27s_Call_the_Whole_Thing_Off

🎶 "You like crun, I like runc. You say buildah, I say builder. ..."


Docker

To run `docker` on the host (assumes docker-cli is installed), run the following commands:
------
docker context create lima --docker "host=unix:///home/anders/.lima/docker/sock/docker.sock"
docker context use lima
docker run hello-world
------
$ docker context list
NAME      DESCRIPTION                               DOCKER ENDPOINT                                     KUBERNETES ENDPOINT   ORCHESTRATOR
default   Current DOCKER_HOST based configuration   unix:///var/run/docker.sock                                               swarm
lima *                                              unix:///home/anders/.lima/docker/sock/docker.sock                         

Podman

To run `podman` on the host (assumes podman-remote is installed), run the following commands:
------
podman system connection add lima "unix:///home/anders/.lima/podman/sock/podman.sock"
podman system connection default lima
podman --remote run quay.io/podman/hello
------
$ podman system connection list
Name                         Identity                                  URI
lima*                                                                  unix:///home/anders/.lima/podman/sock/podman.sock
podman-machine-default       /home/anders/.ssh/podman-machine-default  ssh://core@localhost:45615/run/user/1000/podman/podman.sock
podman-machine-default-root  /home/anders/.ssh/podman-machine-default  ssh://root@localhost:45615/run/podman/podman.sock

@afbjorklund
Copy link
Member Author

PS. You might want to use the fully qualified name, also for docker.io ?

Status: Image is up to date for hello-world:latest
docker.io/library/hello-world:latest

https://www.redhat.com/en/blog/be-careful-when-pulling-images-short-name

I used the full name for podman, since some don't have quay.io set up.

Error: short-name "podman/hello" did not resolve to an alias and no unqualified-search registries are defined in "/etc/containers/registries.conf"

Resolved "hello-world" as an alias (/etc/containers/registries.conf.d/shortnames.conf)
Trying to pull docker.io/library/hello-world:latest...

@AkihiroSuda AkihiroSuda added this to the v0.8.3 milestone Feb 11, 2022
@AkihiroSuda AkihiroSuda merged commit d03f921 into lima-vm:master Feb 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants