restart: no is default mode. There is line inside your docker-compose file with restart: no or restart: unless-stopped. It also means that when you boot your system, it (re)starts container(s) again as long as docker daemon. Details
You need to change restart to no or on-failure, example:
version: '2.1' services: backend: restart: on-failure build: args: USER_ID: ${USER_ID} context: codebase/namp-backend dockerfile: Dockerfile.dev ports: - "5001:5001" - "5851:5851" volumes: - ./codebase/namp-backend:/codebase environment:
Also docker-compose down for most cases, gives you the same result - do not start containers while (docker) system startup, except: containers will be deleted after this, not stopped.
restart: alwaysin it. If there is, then try changing it torestart: unless-stopped.restart: always. I will change it and see what happens.restart: unless-stoppedcauses docker to time out on requests (ps,stop,kill). And rebooting still starts all the containers!docker-compose stop, but for medocker-compose downworks like a charm. I tend to pair it with--rmi local, but be careful with that.