Created
April 23, 2021 06:12
-
-
Save farkroft/9d4edc9c0d9f23d89035080311f40a4d to your computer and use it in GitHub Desktop.
Debug Docker Container
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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