Created
February 17, 2020 14:22
-
-
Save sio/405bbd4c8bcd3ca7f1a19efabf4ce3dd to your computer and use it in GitHub Desktop.
Environment with dysfunctional PID 1 that does not reap zombies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Environment with dysfunctional PID 1 that does not reap zombies | |
# | |
# One zombie process in created automatically upon interactive invocation. | |
# Use `ps -ef` to see it | |
FROM python:slim-buster | |
RUN apt-get update && apt-get -y install procps psmisc | |
RUN echo "bash -c 'sleep 1 & disown'" > /create-zombie.bash | |
CMD ["python", "-c", "import pty; pty.spawn(['bash', '--init-file', '/create-zombie.bash'])"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment