Even after i stoped all docker containers and did docker system prune -a
Docker is still downloading and executing tutum/php-apache by runing the command docker-compose up
, here is my docker-compose.yml:
version: '2'
services:
postgres:
image: camptocamp/postgres
web:
image: nginx
ports:
- "8000:80"
volumes:
- '.:/usr/share/nginx/html
' And here is runing containers:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3807234b989f camptocamp/postgres "docker-entrypoint.s…" 5 minutes ago Up 5 minutes 5432/tcp ferrybox_postgres_1
551acc487c9d tutum/apache-php "/run.sh" 5 minutes ago Up 5 minutes 80/tcp, 0.0.0.0:32786->8000/tcp ferrybox_web_1
docker system prune -a
will remove all unused images , so assuming that you when executing this command - it is possible that tutum/apache-php image was used by the running-container and it was not created/started by the current docker-compose.yml file (may be docker-compose.yml file had this entry before).
docker@default:~$ docker system prune --help
Usage: docker system prune [OPTIONS]
Remove unused data
Options:
-a, --all Remove all unused images not just dangling ones
--filter filter Provide filter values (e.g. 'label=<key>=<value>')
-f, --force Do not prompt for confirmation
--volumes Prune volumes
docker@default:~$
Can you stop the container (use container-id or name) and remove it,
just to ensure if tutum/apache-php container was created+started again when you invoke docker-compose up
?
#>docker rm -f 3807234b989f
#>docker rm -f 551acc487c9d
#>docker system prune -a
#>docker-compose up
#>docker-compose ps
#>docker ps
Let me know if you get the same output as you were getting earlier.