Hello, I am fairly new to Docker, and am having an odd problem with one of my containers, based on the “wordpress:latest” image from Docker Hub.
I am running Docker Desktop for Windows on a Windows 10 Professional machine.
My problem is that I have a “phantom” volume that keeps being created, and I cannot make it go away.
My docker-compose file:
version: “3”
services:
wordpress:
image: wordpress:latest
network_mode: {redacted}
ports:
- 80
- 443
restart: always
environment:
VIRTUAL_HOST: {redacted}
WORDPRESS_DB_HOST: {redacted}
WORDPRESS_DB_NAME: {redacted}
WORDPRESS_DB_USER: {redacted}
WORDPRESS_DB_PASSWORD: {redacted}
LETSENCRYPT_HOST: {redacted}
LETSENCRYPT_EMAIL: {redacted}
container_name: wordpress
volumes:
- C:/Wordpress:/var
networks:
default:
external:
name: {redacted}
When I actually create this container, I end up with TWO volumes:
"Mounts": [
{
"Type": "bind",
"Source": "/host_mnt/c/Wordpress",
"Destination": "/var",
"Mode": "rw",
"RW": true,
"Propagation": "rprivate"
},
{
"Type": "volume",
"Name": "d0ffce5348df79682a906dd3976a68c2c595c4c2604b54efbc928af065705e42",
"Source": "/var/lib/docker/volumes/d0ffce5348df79682a906dd3976a68c2c595c4c2604b54efbc928af065705e42/_data",
"Destination": "/var/www/html",
"Driver": "local",
"Mode": "",
"RW": true,
"Propagation": ""
}
],
My question is this: How do I get rid of the second mount (the one NOT included in the docker-compose file)?
It seems like the file mount is being linked to the Host VM. I have tried to delete and purge the container, volume, image, but the wrong share just keeps coming back (albeit with a different GUID in the Source folder)
I would like a single mount between my local PC (C:/Wordpress) and the container folder /var/www/html.
Can anyone help? I’ve searched and searched, but I cannot find anything like this situation.
Thank you for any help you can offer…