devops: gracefully handle stopping already-stopped container (#16528)
This commit is contained in:
Родитель
7942d296f1
Коммит
81ed8fc523
|
@ -86,7 +86,7 @@ elif [[ "$2" == "compile" ]]; then
|
|||
elif [[ "$2" == "enter" ]]; then
|
||||
docker run --rm ${DOCKER_ARGS} --init --name "${DOCKER_CONTAINER_NAME}" --platform "${DOCKER_PLATFORM}" -it "${DOCKER_IMAGE_NAME}" /bin/bash
|
||||
elif [[ "$2" == "kill" || "$2" == "stop" ]]; then
|
||||
docker kill "${DOCKER_CONTAINER_NAME}"
|
||||
docker kill "${DOCKER_CONTAINER_NAME}" || true
|
||||
# Wait for container to stop
|
||||
docker wait "${DOCKER_CONTAINER_NAME}" || true
|
||||
else
|
||||
|
|
Загрузка…
Ссылка в новой задаче