This is a known issue and appears in Harbor 1.8.
To work around this issue, remove the '
Dead' containers and use
monit
to restart harbor process.
Here are procedures to remove the '
Dead' containers.
1. Find the docker binary.
# find /var/vcap/data/packages -name docker
/var/vcap/data/packages/docker
/var/vcap/data/packages/docker/2ee5307091baf5e28d7ec7b80209cd4fac331aaf/bin/docker
2. Create an alias for convenience.
# alias docker=/var/vcap/data/packages/docker/2ee5307091baf5e28d7ec7b80209cd4fac331aaf/bin/docker
3. Setup the environment.
# export DOCKER_HOST=unix:///var/vcap/sys/run/docker/dockerd.sock
4. List the containers with the status '
Dead'.
# docker container ls -a

5. Remove these '
Dead' containers.
# docker container rm container_id
If there are no containers listed out in step 4, we can use the following command to clean up them.
# docker container prune