I'm trying to run a docker container as a background task, and also execute a few commands inside it. When I run:
docker run -d --rm --ipc host --net host \
--privileged --name test5 bash -c 'echo "hi"' docker/getting-started
docker ps returns empty. docker ps -a doesn't show any docker containers started either.
Is there a way to keep the docker container running in the background, and execute the commands after it starts? Thanks for your help!