ocurrent / obuilder

Experimental "docker build" alternative using btrfs/zfs snapshots
Apache License 2.0
60 stars 17 forks source link

Extract and apply more implicit state than just environment variables #182

Open patricoferris opened 7 months ago

patricoferris commented 7 months ago

In particular the user and the working directory of the image. These are available in the same way as the environment variables are I believe i.e.

% docker image inspect --format '{{.Config.User}}' -- ocaml/opam
opam

Which might need a little more work in terms of reading something like /etc/passwd to get the UID and GID that runc needs. Although, see user here: https://github.com/opencontainers/image-spec/blob/main/config.md

% docker image inspect --format '{{.Config.WorkingDir}}' -- ocaml/opam
/home/opam