Skip to content

Make use of same socket expose for both podman and docker client #3020

@praveenkumar

Description

@praveenkumar

As of now we do something following but if we are exposing the socket then we might just use it for both podman/docker client instead using ssh implementation for podman and socket expose for docker.

$ ./crc podman-env
export PATH="/Users/prkumar/.crc/bin/oc:$PATH"
export CONTAINER_SSHKEY="/Users/prkumar/.crc/machines/crc/id_ecdsa"
export CONTAINER_HOST="ssh://core@127.0.0.1:2222/run/user/1000/podman/podman.sock"
export DOCKER_HOST="unix:///Users/prkumar/.crc/machines/crc/docker.sock"
$ podman --url unix:///Users/prkumar/.crc/machines/crc/docker.sock images --log-level debug
INFO[0000] podman filtering at log level debug          
DEBU[0000] Called images.PersistentPreRunE(podman --url unix:///Users/prkumar/.crc/machines/crc/docker.sock images --log-level debug) 
DEBU[0000] DoRequest Method: GET URI: http://d/v3.4.4/libpod/_ping 
DEBU[0000] DoRequest Method: GET URI: http://d/v3.4.4/libpod/images/json 
REPOSITORY                       TAG                                       IMAGE ID      CREATED       SIZE
quay.io/crcont/gvisor-tap-vsock  3231aba53905468c22e394493a0debc1a6cc6392  f42b05e6b25e  5 months ago  6.65 MB
DEBU[0000] Called images.PersistentPostRunE(podman --url unix:///Users/prkumar/.crc/machines/crc/docker.sock images --log-level debug) 

We can have something like and expose both root/rootless socket.

$ ./crc podman-env
export PATH="/Users/prkumar/.crc/bin/oc:$PATH"
export CONTAINER_HOST="unix:///Users/prkumar/.crc/machines/crc/docker-rootless.sock"
export DOCKER_HOST="unix:///Users/prkumar/.crc/machines/crc/docker-rootless.sock"
$ ./crc podman-env --root
export PATH="/Users/prkumar/.crc/bin/oc:$PATH"
export CONTAINER_HOST="unix:///Users/prkumar/.crc/machines/crc/docker.sock"
export DOCKER_HOST="unix:///Users/prkumar/.crc/machines/crc/docker.sock"

Metadata

Metadata

Assignees

No one assigned

    Labels

    status/staleIssue went stale; did not receive attention or no reply from the OP

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions