Open patricoferris opened 6 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
/etc/passwd
user
% docker image inspect --format '{{.Config.WorkingDir}}' -- ocaml/opam /home/opam
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.
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, seeuser
here: https://github.com/opencontainers/image-spec/blob/main/config.md