ocurrent / ocurrent/obuilder

Extract and apply more implicit state than just environment variables

Open
#182 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
OCaml
Stars
67
Forks
19
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how obuilder currently extracts environment variables from Docker image configuration, then read the linked OCI image-spec description of User and WorkingDir. Done means the image's working directory and user state are applied to the runc configuration, including UID/GID resolution from /etc/passwd where needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, ocaml
Domain
build-system, devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.