Trying to ssh into running container using dockerode. I want to run a container with commands like 'node dist/server.js' then after container is started ssh it into it and run bash by default. Looked at all the examples for attach a container but all examples are first creating the container with CMD as bash and then just attaching it.
Asked
Active
Viewed 414 times
1 Answers
0
You can try docker exec -it $your_container_id bash
.
The docs provide more info on what it does and all the options. But it should work with whatever format you Dockerfile has.

Horia Coman
- 8,681
- 2
- 23
- 25
-
I want to do using dockerode library not docker cli client. – Ratnadeep Bhattacharyya Jan 19 '19 at 15:28