I build a Docker image with Node.js and pm2. I started the container with:
docker run -d --name test -p 22 myImage
Then I go inside the container with:
docker exec -it test /bin/bash
In the container, exec the command:
pm2 list
And it stuck here:
P.s.: My application works well in the Docker container, if I add CMD pm2 start app.js
in the Dockerfile
.
This is the new approach.
Please do not use previous approaches.