Open mmh352 opened 3 years ago
Incorrectly closed.
In the scripts
block, Docker image layers seem to be built from one or more - commands:
lists. If only one scripts
block is available, then it would make sense to allow the user to be defined for each commands
layer.
This probably requires a schema change in the yml file, or a hack, such as allowing the first line of a - commands
list to use some bespoke convention to specify a #!>USER myuser
. After the command list, if an explicit user was defined, the dockerfile should then ensure it reverts to the default user for the next layer.
Currently all scripts are run as the root user. For some setup scenarios, for example database initialisation, it would be useful to be able to run a script as a different user.