docker/start fails when image is already in use
nightduck opened this issue · 1 comments
nightduck commented
This may only impact us developers who have to launch it more than once, but there is a persistent issue where calling stop
on the previous container also removes it but does so asynchronously. This causes conflicts when attempting to restart it, but the user is still prompted to run docker/shell
(which will fail, because there's no container running).
oren@oren-mc1040:~/git/roscon-2023-realtime-workshop$ docker/start
+ docker stop roscon-2023-realtime-workshop
roscon-2023-realtime-workshop
+ docker rm roscon-2023-realtime-workshop
Error response from daemon: removal of container roscon-2023-realtime-workshop is already in progress
++ pwd
++ id -u
++ id -g
+ docker run -d --device=/dev/dri --volume=/tmp/.X11-unix:/tmp/.X11-unix --volume=/home/oren/git/roscon-2023-realtime-workshop:/code --ulimit=rtprio=98 --ulimit=memlock=-1 --cap-add=SYS_NICE --init --rm -p 3100:3100 -e DISPLAY= -e QT_X11_NO_MITSHM=1 -e HOST_UID=1000 -e HOST_GID=1000 --name=roscon-2023-realtime-workshop roscon-2023-realtime-workshop
docker: Error response from daemon: Conflict. The container name "/roscon-2023-realtime-workshop" is already in use by container "77bbd844afd149378336d2d5e3173f1ec3f066fb9aee0159993098d5e3d20e54". You have to remove (or rename) that container to be able to reuse that name.
See 'docker run --help'.
+ set +x
Started container roscon-2023-realtime-workshop. To enter the container, run the command:
docker/shell
shuhaowu commented
Good catch. Will fix. Basically need a wait in there i think