OWASP / crAPI

completely ridiculous API (crAPI)
Apache License 2.0
1.13k stars 347 forks source link

dependency failed to start: container crapi-workshop exited #172

Open Alexandru93s opened 1 year ago

Alexandru93s commented 1 year ago

Describe the bug After running "docker compose -f docker-compose.yml --compatibility up -d" I receive the error: dependency failed to start: container crapi-workshop exited (0)

To Reproduce Steps to reproduce the behavior.

  1. Use the commands listed on github: (curl -o docker-compose.yml https://raw.githubusercontent.com/OWASP/crAPI/main/deploy/docker/docker- compose.yml docker compose pull docker compose -f docker-compose.yml --compatibility up -d) with Network of the VM set to NAT. Behaviour of crapi: all containers start and no errors are received.
  2. Shutdown the VM, change Network to internal network, and start VM. Use the last command and you'll receive the error.

Expected behavior All containers should start.

Runtime Environment Sytem/Environemnt information (e.g Output of docker -v and uname -a) -Debian 11 running in VirtualBox 7 -Network of VM changed from the default NAT to Internal Network -Docker Engine - Community Version: 23.0.1 -Docker Compose version v2.16.0 crapi-workshop log.txt

mathew-jose commented 1 year ago

Could you try adocker-compose down to remove the previous containers.

If that does not work, it could be because because old data is persisted in docker volumes, you should then remove the postgresdb related docker volume. Use the commands

docker volume rm docker_postgresql-data
docker volume rm docker_mongodb-data

This happened because crapi was shutdown in the middle of container starting which persisted the temporarily created test databases in postgresdb.

Alexandru93s commented 1 year ago

I did a docker compose down and nothing changed, I still get the error for the crapi-workshop, and after that I tried the docker volume rm commands and received: Error response from daemon: get docker_postgresql-data: no such volume Error response from daemon: get docker_mongodb-data: no such volume I then used the docker compose stop, shut down the vm, and changed the VM Network from internal to NAT. All containers started. Is an internet connection required? I used the docker compose logs and attached the logs for this command. docker compose logs.txt