I am attempting to set up a gitlab-runner container with a Red Hat EL 8 environment, since the code to be tested is to run on Red Hat EL 8. To that end, I have built a RHEL8 VM with docker installed (docker-ce-20.10.7-3.el7.x86_64) and started the container like so:
sudo docker run -d --name gitlab-runner --restart always -v /var/run/docker.sock:/var/run/docker.sock -v gitlab-runner-config:/etc/gitlab-runner registry.access.redhat.com/ubi8/ubi /bin/sleep infinity
I exec into the container (sudo docker exec -it gitlab-runner /usr/bin/bash), and use yum to install procps-ng, which brings in procps-ng-3.3.15-14.el8.x86_64. My problem is that when I then run ps in the container, it kills the exec shell:
[root@c2800a43c06b /]# ps
PID TTY TIME CMD
6 pts/0 00:00:00 bash
40 pts/0 00:00:00 ps
$
Note how the prompt changes from '[root@c2800a4dc06b /]#' to '$' - the container shell has exited. How do I configure things so that the shell returns to the container root prompt instead of exiting?