spinalcordtoolbox / sct_docker

Docker distribution of Spinal Cord Toolbox
3 stars 3 forks source link

Documentation on second/further use (mac) #23

Open YangHee-Min opened 5 years ago

YangHee-Min commented 5 years ago

Issue

After running sct_docker the first time, I simply terminated the window and tried to run it again using:

docker run -p 2222:22 --rm -it -v ~/docker_shared_folder://home/sct/docker_shared_folder neuropoly/sct:sct-v4.0.0-beta.0-ubuntu-18.04

However, I got the following error message: docker: Error response from daemon: driver failed programming external connectivity on endpoint vigorous_euler (057e441f34bae6501a244310d6b6bde927d930c2f3f69be5bad79a61c608a34c): Bind for 0.0.0.0:2222 failed: port is already allocated.

I went into the documentation, but did not find anything on the subject.

Solution

  1. Open up a new terminal window

  2. Use command docker ps

  3. Find name of docker container under column labeled NAMES

  4. Use command docker stop [DOCKER NAME]

Request

Add to documentation steps on how to terminate docker container and second/further use

zougloub commented 5 years ago

I was under the impression that a container launched with interactive + terminal would get terminated on logout...