I just started using Docker, and I really like it, but I have a clumsy one that I would like to optimize. When I repeat my Dockerfile script I often check things after the build, starting a bash session, running some commands, finding out that such and such a package was not installed correctly, then returning and setting up my Dockerfile.
Say I created my image and marked it as buildfoo, I would run it like this:
$> docker run -t -i buildfoo ... enter some bash commands.. then ^D to exit
Then I will have a container that I have to empty. Usually I just hook everything like this:
docker rm --force `docker ps -qa`
This works well for me. However, I do not need to manually remove the container.
Any advice gratefully accepted!
Some additional small details:
Running a minimal centos 7 image and using bash as my shell.
source share