I spent some of today trying to work out why a Docker image that I was using did not work correctly.
This is the most useful command for debugging a docker image:
docker run -it ubuntu /bin/bash
This is based upon the ubuntu image but feel free to replace it with whatever you are trying to debug.
You can do the same with a docker-compose
docker-compose run --entrypoint /bin/bash
I am now looking at how to run a gradle build inside a docker container and then extract the log files. It will be especially useful to be able to view the log files. It may be possible to add a web server to view them.
It’s now also possible to stand up a Jenkins server on your dev machine to test Jenkinsfiles before deploying them to the build server.
docker run -p 8080:8080 -p 50000:50000 jenkins/jenkins:lts