Is it possible to start a shell session in a running container (without ssh)

后端 未结 15 1204
滥情空心
滥情空心 2020-11-29 14:33

I was naively expecting this command to run a bash shell in a running container :

docker run \"id of running container\" /bin/bash

it look

15条回答
  •  盖世英雄少女心
    2020-11-29 15:08

    Just do

    docker attach container_name
    

    As mentioned in the comments, to detach from the container without stopping it, type Ctrlpthen Ctrlq.

提交回复
热议问题