Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
  • Loading branch information
hexfusion committed Jun 23, 2023
1 parent 370bc57 commit 630a733
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions vms/rpcchainvm/runtime/podman/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ package podman

import (
"context"
"fmt"
"os"

"github.com/containers/podman/v4/libpod/define"
"github.com/containers/podman/v4/pkg/bindings/containers"
"github.com/containers/podman/v4/pkg/bindings/images"
Expand Down Expand Up @@ -68,7 +71,9 @@ func exists(ctx context.Context, id string) (bool, error) {
}

func getSocketPath() (string, error) {
// TODO: make this configurable, hardcode for macos for now
socket := "unix:" + "/Users/hao.hao/.local/share/containers/podman/machine/qemu/podman.sock"
return socket, nil
}
sockDir := os.Getenv("XDG_RUNTIME_DIR")
if sockDir == "" {
return "", fmt.Errorf("failed to find rootless socket")
}
return fmt.Sprintf("unix:%s/podman/podman.sock", sockDir), nil
}

0 comments on commit 630a733

Please sign in to comment.