oh boy i just hit a new fun issue maybe

oh boy, i just hit a new fun issue... maybe @akdev has seen? Here's my setup: On host F38:
systemctl --user enable --now podman.socket
# in .bashrc export DOCKER_HOST=unix:///run/user/$UID/podman/podman.sock
# so it's there
# i have moby-engine installed, but disabled, verified socket and service are not running so shouldn't be a problem, but useful for testing
systemctl --user enable --now podman.socket
# in .bashrc export DOCKER_HOST=unix:///run/user/$UID/podman/podman.sock
# so it's there
# i have moby-engine installed, but disabled, verified socket and service are not running so shouldn't be a problem, but useful for testing
in the host terminal:
$ docker info
Client:
Version: 24.0.5
Context: default
Debug Mode: false

Server:
Containers: 1
Running: 1
Paused: 0
Stopped: 0
Images: 1
Server Version: 4.7.0
---snip---
$ docker info
Client:
Version: 24.0.5
Context: default
Debug Mode: false

Server:
Containers: 1
Running: 1
Paused: 0
Stopped: 0
Images: 1
Server Version: 4.7.0
---snip---
this is as expected, because docker respects the DOCKER_HOST var and uses podman socket as it's server but... distrobox enter fedora into a stock fedora 38 distrobox
$ sudo ln -sf /usr/bin/distrobox-host-exec /usr/local/bin/docker
$ echo $DOCKER_HOST
unix:///run/user/10000/podman/podman.sock
$ ls -laZ /run/user/10000/podman/podman.sock
srw-rw----. 1 benjamin benjamin unconfined_u:object_r:user_tmp_t:s0 0 Oct 2 14:13 /run/user/10000/podman/podman.sock
$ docker info
docker info
Client:
Version: 24.0.5
Context: default
Debug Mode: false

Server:
ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
errors pretty printing info
$ sudo ln -sf /usr/bin/distrobox-host-exec /usr/local/bin/docker
$ echo $DOCKER_HOST
unix:///run/user/10000/podman/podman.sock
$ ls -laZ /run/user/10000/podman/podman.sock
srw-rw----. 1 benjamin benjamin unconfined_u:object_r:user_tmp_t:s0 0 Oct 2 14:13 /run/user/10000/podman/podman.sock
$ docker info
docker info
Client:
Version: 24.0.5
Context: default
Debug Mode: false

Server:
ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
errors pretty printing info
11 Replies
bsherman
bshermanOP15mo ago
that's already a wall of text so i'm threading it ]bsherman: I have done this many times [2:42 PM]bsherman: i am confused why it's not working now [2:46 PM]bsherman: an issue with distrobox-host-exec maybe
akdev
akdev15mo ago
Looks like distrobox-host-exec doesn’t forward the environment
bsherman
bshermanOP15mo ago
in general? i'm just getting to pulling that source up
akdev
akdev15mo ago
You could use the —remote flag perhaps?
bsherman
bshermanOP15mo ago
i would SWEAR this has worked many times hmmm i wonder if maybe Gnome / GDM was setting my environment globally?
akdev
akdev15mo ago
I’ve never used distrobox for anything meaningful unfortunately so not sure 😄 podman —remote allows you to specify the url in the command line though might be a workaround I don’t think so but you could check the environment of those systemd units
bsherman
bshermanOP15mo ago
i'm tinkering with sway/sericea using sddm-wayland... so... i've already noticed some other minor differences with environment this is almost certainly the problem... I feel a bit silly now yes, distrobox-host-exec env demonstrates your point quite well
akdev
akdev15mo ago
Maybe a hack you could do: distrobox-host-exec bash -c 'CONTAINER_HOST=/the/stuff podman'
bsherman
bshermanOP15mo ago
huh, this is odd, but i looked at the change history for host-spawn and distrobox-host-exec and i don't see anything obviously related to this so i'm wondering if i'm crazy but i'll try your suggestion, that should work it works
bsherman
bshermanOP15mo ago
host-spawn --env DOCKER_HOST docker info DOES work so before host-spawn 1.4.1 which showed up in distrobox in March... what I remember would have been true... so maybe i'm not crazy, i just noticed for the first time today oh! actually even later than March... because Jun 17 is when luca released distrobox 1.5.0 which added host-spawn version 1.4.1 and Fedora may have updated later? yeah, looks like end of June i think i'm going to need to patch this
Want results from more Discord servers?
Add your server