Skip to content

Instantly share code, notes, and snippets.

@farkroft
Created April 23, 2021 06:12
Show Gist options
  • Save farkroft/9d4edc9c0d9f23d89035080311f40a4d to your computer and use it in GitHub Desktop.
Save farkroft/9d4edc9c0d9f23d89035080311f40a4d to your computer and use it in GitHub Desktop.
Debug Docker Container
Build your docker image
run your docker image
then check by run command "docker ps -a"
if your docker exited, then copy your exited container id
then run "docker commit {{container ID}} {{your new image name}}"
example: "docker commit 0dfd54557799 debug/batch"
then run your new image with command "docker run -it --entrypoint sh {{your new image name}}"
example: "docker run -it --entrypoint sh debug/batch"
and now you are inside your docker container and then try debug your app with it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment