Changes between 5.0.0 and 5.1.0
- Make the entry point and its arguments persistent:
-
Although a container is primarily configured using environment variables, there may be cases where defining arguments modifies the behavior of the entry point, so it might be useful to preserve both a custom entry point and its arguments. For example, in the PostgreSQL OCI image, arguments can specify parameters for the
postgresdaemon, and the current behavior will only take them into account at the time of executingoci run, but not after (re)starting the jail (i.e., at system startup).To implement this, the
set-args,set-entrypoint,del-args, anddel-entrypointsubcommands have been added, and logic has been implemented in the-Pflag ofoci runto call these subcommands.oci execwill now prioritize both the custom entry point and the custom arguments over those defined by the OCI image.And while here: create a common function that the
del-*subcommands can call to avoid repetitive code and simplify the process. Also, don't display the PID when there isn’t one inoci exec, which happens with processes that spawn and die quickly.
-
- Redirect stdout to stderr:
- Some child processes run without redirecting stdout to stderr, so stdout is displayed on the parent process. This was done primarily so that
oci runcould redirect stdout to a file or another destination (such as a pipe) without corrupting the file.
- Some child processes run without redirecting stdout to stderr, so stdout is displayed on the parent process. This was done primarily so that
Full Changelog: v5.0.0...v5.1.0