Blog: 2024-10-03: Difference between revisions

From razwiki
Jump to navigation Jump to search
(Created page with "Got podman working with lima <pre> podman $ ./bin/podman --url unix:///Users/razzi/.lima/podman/sock/podman.sock run -it debian root@e6f3c2aa79b5:/# exit ./⏎ podman $ ./bin/podman --version podman version 5.3.0-dev </pre> Needed this lima command to start the podman machine: limactl start template://podman I got the url from lima's source: <pre> lima $ cat cmd/podman.lima #!/bin/sh set...")
 
No edit summary
Line 43: Line 43:


env LIMA_INSTANCE=podman lima podman run -it debian
env LIMA_INSTANCE=podman lima podman run -it debian


https://github.com/runfinch/finch seems similar but it's a gui app or something?

Revision as of 13:12, 3 October 2024

Got podman working with lima

podman $ ./bin/podman --url unix:///Users/razzi/.lima/podman/sock/podman.sock run -it debian
root@e6f3c2aa79b5:/# 
exit
./⏎                                                                             podman $ ./bin/podman --version
podman version 5.3.0-dev

Needed this lima command to start the podman machine:

limactl start template://podman

I got the url from lima's source:

lima $ cat cmd/podman.lima 
#!/bin/sh
set -eu
: "${LIMA_INSTANCE:=podman}"
: "${PODMAN:=podman}"

if [ "$(limactl ls -q "$LIMA_INSTANCE" 2>/dev/null)" != "$LIMA_INSTANCE" ]; then
  echo "instance \"$LIMA_INSTANCE\" does not exist, run \`limactl create --name=$LIMA_INSTANCE template://podman\` to create a new instance" >&2
  exit 1
elif [ "$(limactl ls -f '{{ .Status }}' "$LIMA_INSTANCE" 2>/dev/null)" != "Running" ]; then
  echo "instance \"$LIMA_INSTANCE\" is not running, run \`limactl start $LIMA_INSTANCE\` to start the existing instance" >&2
  exit 1
fi
PODMAN=$(command -v "$PODMAN" || true)
if [ -n "$PODMAN" ]; then
  CONTAINER_HOST=$(limactl list "$LIMA_INSTANCE" --format 'unix://{{.Dir}}/sock/podman.sock')
  export CONTAINER_HOST
  exec "$PODMAN" --remote "$@"
else
  export LIMA_INSTANCE
  exec lima podman "$@"
fi

Even simpler:

env LIMA_INSTANCE=podman lima podman run -it debian


https://github.com/runfinch/finch seems similar but it's a gui app or something?