Hands-on task
The nightly export as PID 1
The nightly export /opt/batch/job.sh is about to move into a container, and there it will become PID 1 — the first process, which sees only itself and its descendants. Before building the image, try it in that setting by hand.
Run /opt/batch/job.sh in a new PID namespace so that:
- the export is the process with PID 1 in that namespace;
psinside shows only the export and its descendants, not the whole server.
The export must keep running — start it in the background.
- namespaces
- unshare
- pid namespace
- /proc