0

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.

1 Answers1

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