This is an archive of the discontinued Mercurial Phabricator instance.

packaging: consistently create build user in Dockerfiles
ClosedPublic

Authored by indygreg on Jun 16 2018, 2:19 PM.

Details

Summary

Previously, dockerlib.sh appended some commands to create a
"build" user in each Docker image. The resulting Docker images
could be inconsistent depending on the execution environment
and base image.

With this change, we explicitly create our custom user and
group as the first action in each Dockerfile. The user always
has user:group 1000:1000 and all built images are consistent.

We also create a home directory for the user under /build.
This directory is currently ignored.

As part of this, we stop setting the DBUILDUSER variable in
dockerlib.sh and instead set it in the respective scripts that
call it. This is in preparation for further refactoring of
dockerlib.sh.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

indygreg created this revision.Jun 16 2018, 2:19 PM
durin42 accepted this revision.Jun 25 2018, 10:50 AM
This revision is now accepted and ready to land.Jun 25 2018, 10:50 AM
This revision was automatically updated to reflect the committed changes.