ContainerImages/jenkins-base/pipeline/head This commit looks goodDetails
Using `python` as PID 1 like this doesn't actually work because PID 1
doesn't have any default signal handlers. Thus, when the container
runtime tries to stop the container by sending SIGTERM to the main
process, nothing happens and it eventually has to send SIGKILL to stop
it. By using a "real" init process as PID 1, we can be sure that signal
handlers are set up correctly, plus, we won't leave a bunch of zombie
processes while the container is running.
ContainerImages/jenkins-base/pipeline/head This commit looks goodDetails
There's really no reason to pin to a specific version of Fedora. Doing
so just means we're going to be perpetually behind, since I'm never
going to remember to update it manually.
ContainerImages/jenkins-base/pipeline/head This commit looks goodDetails
I forgot that not only does USER apply to the process launched inside
the container, it also applies to any directives later in the build
process, including those for images that inherit FROM this image. As
such, those images would have to have a USER directive before running
anything as root, e.g. `dnf install`, and then another USER directive to
set the process user. Since this image isn't intended to be used
directly there's really no point in setting USER here, then.
ContainerImages/jenkins-base/pipeline/head This commit looks goodDetails
I've created a few container images for Jenkins jobs over the past few
weeks, and many of them have several steps in common. Moving those
steps to the *jenkins-base* image will simplify the rest and make it
easier to create new ones.
* Use UID 1000 for the *jenkins* user, since this is the UID the Jenkins
agent JNLP container uses
* Configure the SSH client `KnownHostsCommand` setting to fetch the SSH
host key database from the file server
* Run as the unprivileged user
* Add a "sleep forever" type entry point: Python's `signal.pause()`
waits for a signal from the operating system, where as other solutions
are either uninterruptable (`sleep infinity`) or wake frequently
(`tail -f /dev/null`)