I think I’m missing something. Downloading the image with with the incus cli :
incus image export linuxserver:linuxserver/qbittorrent:latest qbittorrent-oci-via-incus
tar xzf qbittorrent-oci-via-incus
jq '.process.env' config.json
I get get indeed HOME=/root:
[
"PATH=/lsiopy/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"TERM=xterm",
"PS1=$(whoami)@$(hostname):$(pwd)\\$ ",
"HOME=/root",
"S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0",
"S6_VERBOSITY=1",
"S6_STAGE2_HOOK=/docker-mods",
"VIRTUAL_ENV=/lsiopy",
"LSIO_FIRST_PARTY=true",
"XDG_CONFIG_HOME=/config",
"XDG_DATA_HOME=/config"
]
I don’t know much about OCI images format, so I’ve been looking for another way to download the image.
The opencontainers/image-tools repo says to use skopeo to download an OCI image, e.g. skopeo copy docker://XXX:latest oci:XXX:latest. In the documentation of skopeo, they describe docker:// is for “registry implementing the Docker Registry HTTP API V2”.
I’m not 100% sure that’s what I wanted, but here is the interesting part :
skopeo copy docker://lscr.io/linuxserver/qbittorrent:latest oci:qbittorrent-oci-via-skopeo:latest
skopeo inspect oci:qbittorrent-oci-via-skopeo | jq '.Env'
Note : lscr.io is basically redirecting to Github’s registry.
This time I get HOME=/config:
[
"PATH=/lsiopy/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"PS1=$(whoami)@$(hostname):$(pwd)\\$ ",
"HOME=/config",
"TERM=xterm",
"S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0",
"S6_VERBOSITY=1",
"S6_STAGE2_HOOK=/docker-mods",
"VIRTUAL_ENV=/lsiopy",
"LSIO_FIRST_PARTY=true",
"XDG_CONFIG_HOME=/config",
"XDG_DATA_HOME=/config"
]
So I’m confused, what could explain the difference of HOME?
I think that it’s probably a OCI vs Docker registry thing, but not sure if it’s something specific to their build process, the registry, Incus or skopeo.