[Docker] Debug a Node.js Container

1. Pull the docker image

docker pull isjustintime/debug-me:latest

 

2. Run the image:

docker run -d isjustintime/debug-me

 

3. Check docker is running:

docker ps

 

4. See the docker inspect for more imformation:

docker inspect 0d8a85a50e1c

 

5. Get into container

docker exec -it 0d8a85a50e1c sh

 Inside container, you can use all linux cmds:

pwd # /usr/src/app

See what process are running

[Docker] Debug a Node.js Container

 

6. Exit container cmd

# exit

 

7. See the docker logs:

docker logs 0d8a85a50e1c

Seeing:

ReferenceError: getData is not defined

 

[Docker] Debug a Node.js Container

上一篇:Web框架 03


下一篇:windows 使用excel导出的问题