Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
patricoferris opened this issue Apr 12, 2024 · 0 comments
Open

Comments

@patricoferris
Copy link
Contributor

patricoferris commented Apr 12, 2024

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant