Reputation: 8915
The wordpress service is running confirmed by docker service ls
and the blog is up when visiting the blog url (which gets taken down after executing docker stack rm wordpress
).
Once wordpress is deployed using docker stack deploy
the stack looks like this:
user@prod:~/wordpress$ docker service ls
ID NAME MODE REPLICAS IMAGE PORTS
ph38i5su9slr traefik_traefik replicated 1/1 traefik:v2.4
yhu02cqufy8l wordpress_db replicated 1/1 mysql:5.7
v4q2ztqwv118 wordpress_wordpress replicated 1/1 wordpress:latest
user@prod:~/wordpress$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
697cf6cfa806 traefik:v2.4 "/entrypoint.sh --pr…" 4 days ago Up 4 days 0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp traefik_traefik.1.i4txtjd2p0rcbnpd3bkv54eo2
Why are the wordpress containers not showing up in docker ps -a
?
Upvotes: 1
Views: 1301
Reputation: 1744
You're using Docker Swarm
which can run over multiple nodes in cluster mode.
A plausible scenario is that traefik
is running on the node where you're executing the docker ps -a
command and the other containers are running on different node/s.
To confirm that there is more than one node you can try and execute docker node ls
. I can't think of any other scenario where you have a running service, but only one of the containers is visible (and you have a single host).
Upvotes: 1