docksal: project_root showing different paths in docker and docksal. Unable to restart project without removing volumes.
Description
When starting up a “new” project (after running fin project remove) the docker volume created for the project_root and the docksal project config show different paths. This leads to an issue when restarting the project that there is a volume of the same name with a different “device” driver_opt.
docksal config path: /c/Users/gconry/DocksalSites/relatedacsf
docker volume path: /host_mnt/c/Users/gconry/DocksalSites/relatedacsf
This is using WSL Ubuntu 18.04. I’ve never had this issue before and have other projects that are working correctly (although I dare not reset them). Their docker container path match the docksal config path.
Something to note:
My project that works has "com.docker.compose.version": "1.23.2"
The one that is having the issue is "com.docker.compose.version": "1.24.1"
Steps to reproduce the issue:
fin upto start projectfin stopto stop itfin upto restart issue- error message thrown
Describe the results you received:
Error Message: ERROR: Configuration for volume project_root specifies “device” driver_opt /c/Users/gconry/DocksalSites/relatedacsf, but a volume with the same name uses a different “device” driver_opt (/host_mnt/c/Users/gconry/DocksalSites/relatedacsf). If you wish to use the new configuration, please remove the existing volume “relatedacsf_project_root” first: $ docker volume rm relatedacsf_project_root
Describe the results you expected:
Docker volume should have the same path (or not conflict)
Output of fin config:
fin config output
Docker Compose configuration
---------------------
services:
cli:
dns:
- 192.168.64.100
- 8.8.8.8
environment:
BLACKFIRE_CLIENT_ID: null
BLACKFIRE_CLIENT_TOKEN: null
COMPOSER_ALLOW_XDEBUG: '1'
COMPOSER_DISABLE_XDEBUG_WARN: '1'
DOCROOT: docroot
DRUSH_ALLOW_XDEBUG: '1'
DRUSH_OPTIONS_URI: relatedacsf.docksal.site
GIT_USER_EMAIL: ''
GIT_USER_NAME: ''
HOST_GID: '1000'
HOST_UID: '1000'
MYSQL_DATABASE: default
MYSQL_HOST: db
MYSQL_PASSWORD: user
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: user
PHP_IDE_CONFIG: null
SECRET_ACAPI_EMAIL: null
SECRET_ACAPI_KEY: null
SECRET_PLATFORMSH_CLI_TOKEN: null
SECRET_SSH_PRIVATE_KEY: null
SECRET_TERMINUS_TOKEN: null
SSH_AUTH_SOCK: /.ssh-agent/proxy-socket
VIRTUAL_HOST: relatedacsf.docksal.site
XDEBUG_CONFIG: remote_connect_back=0 remote_host=192.168.64.1
XDEBUG_ENABLED: '1'
hostname: cli
image: docksal/cli:php7.2
labels:
io.docksal.shell: bash
io.docksal.user: docker
volumes:
- docksal_ssh_agent:/.ssh-agent:ro
- cli_home:/home/docker:rw
- project_root:/var/www:rw,nocopy,cached
db:
dns:
- 192.168.64.100
- 8.8.8.8
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: null
MYSQL_DATABASE: default
MYSQL_INITDB_SKIP_TZINFO: null
MYSQL_ONETIME_PASSWORD: null
MYSQL_PASSWORD: user
MYSQL_RANDOM_ROOT_PASSWORD: null
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: user
hostname: db
image: docksal/mysql:5.6-1.4
ports:
- 0:3306/tcp
volumes:
- db_data:/var/lib/mysql:rw
- project_root:/var/www:ro,nocopy,cached
web:
depends_on:
cli:
condition: service_started
dns:
- 192.168.64.100
- 8.8.8.8
environment:
APACHE_BASIC_AUTH_PASS: null
APACHE_BASIC_AUTH_USER: null
APACHE_DOCUMENTROOT: /var/www/docroot
APACHE_FCGI_HOST_PORT: cli:9000
hostname: web
image: docksal/apache:2.4
labels:
io.docksal.cert-name: none
io.docksal.permanent: "false"
io.docksal.project-root: /c/Users/gconry/DocksalSites/relatedacsf
io.docksal.virtual-host: relatedacsf.docksal.site,*.relatedacsf.docksal.site,relatedacsf.docksal.site.*
volumes:
- project_root:/var/www:ro,nocopy,cached
version: '2.1'
volumes:
cli_home: {}
db_data: {}
docksal_ssh_agent:
external: true
name: docksal_ssh_agent
project_root:
driver: local
driver_opts:
device: /c/Users/gconry/DocksalSites/relatedacsf
o: bind
type: none
---------------------
Output of docker volume inspect:
docker volume inspect output
[
{
"CreatedAt": "2018-12-11T14:57:16Z",
"Driver": "local",
"Labels": {
"com.docker.compose.project": "relatedacsf",
"com.docker.compose.version": "1.24.1",
"com.docker.compose.volume": "project_root"
},
"Mountpoint": "/var/lib/docker/volumes/relatedacsf_project_root/_data",
"Name": "relatedacsf_project_root",
"Options": {
"device": "/host_mnt/c/Users/gconry/DocksalSites/relatedacsf",
"o": "bind",
"type": "none"
},
"Scope": "local"
}
]
Output of fin sysinfo:
fin sysinfo output
███ OS
WSL Ubuntu 18.04
Linux ZA-NB003 4.4.0-17763-Microsoft #864-Microsoft Thu Nov 07 15:22:00 PST 2019 x86_64 x86_64 x86_64 GNU/Linux
███ ENVIRONMENT
MODE : Docker Desktop
███ FIN
fin version: 1.95.0
███ DOCKER COMPOSE
EXPECTED VERSION: 1.24.1
docker-compose version 1.24.1, build 4667896b
docker-py version: 3.7.3
CPython version: 3.6.8
OpenSSL version: OpenSSL 1.1.0j 20 Nov 2018
███ DOCKER
EXPECTED VERSION: 19.03.4
Client: Docker Engine - Community
Version: 19.03.4
API version: 1.40
Go version: go1.12.10
Git commit: 9013bf583a
Built: Fri Oct 18 15:49:05 2019
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.8
API version: 1.40 (minimum version 1.12)
Go version: go1.12.17
Git commit: afacb8b
Built: Wed Mar 11 01:29:16 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v1.2.13
GitCommit: 7ad184331fa3e55e52b890ea95e65ba581ae3429
runc:
Version: 1.0.0-rc10
GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
docker-init:
Version: 0.18.0
GitCommit: fec3683
███ DOCKSAL: PROJECTS
project STATUS virtual host project root
relatedacsf Up 20 minutes (healthy) relatedacsf.docksal.site,*.relatedacsf.docksal.site,relatedacsf.docksal.site.* /c/Users/gconry/DocksalSites/relatedacsf
███ DOCKSAL: VIRTUAL HOSTS
*.relatedacsf.docksal.site
relatedacsf.docksal.site.*
relatedacsf.docksal.site
███ DOCKSAL: DNS
curl: (6) Could not resolve host: dns-test.docksal
ERROR: Requesting http://dns-test.docksal failed!
███ DOCKER: RUNNING CONTAINERS
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
28f05aea1a3d docksal/apache:2.4 "httpd-foreground" 20 minutes ago Up 20 minutes (healthy) 80/tcp, 443/tcp relatedacsf_web_1
66c8db8d573e docksal/mysql:5.6-1.4 "docker-entrypoint.s…" 20 minutes ago Up 20 minutes (healthy) 0.0.0.0:32768->3306/tcp relatedacsf_db_1
a7ec28aecc96 docksal/cli:php7.2 "/opt/startup.sh sup…" 20 minutes ago Up 20 minutes (healthy) 22/tcp, 3000/tcp, 9000/tcp relatedacsf_cli_1
8a627d0a4e2f docksal/ssh-agent:1.3 "docker-entrypoint.s…" About an hour ago Up 33 minutes (healthy) docksal-ssh-agent
df683668acd8 docksal/dns:1.1 "docker-entrypoint.s…" About an hour ago Up 33 minutes (healthy) 0.0.0.0:53->53/udp docksal-dns
07ae0b1e9bc6 docksal/vhost-proxy:1.5 "docker-entrypoint.s…" About an hour ago Up 33 minutes (healthy) 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp docksal-vhost-proxy
███ DOCKER: NETWORKS
NETWORK ID NAME DRIVER SCOPE
61da783a4523 _default bridge local
dc8120ae36ee bridge bridge local
cde000a0bdd4 host host local
44e294e9ad94 none null local
96758b31a2f0 relatedacsf_default bridge local
███ DOCKER DESKTOP
EXPECTED VERSION: 2.0.0.3
DETECTED VERSION: 2.3.0.3
███ HDD Usage
Caption FreeSpace Size
C: 30313897984 252841029632
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 23 (12 by maintainers)
FWIW I’m getting this issue on Docker Desktop for Mac v2.4.0.0 when using osxfs/bind mode (
DOCKSAL_VOLUMES=bind).Adding the following override in
docksal-local.ymlcan be used as a stop-gap solution for Docker Desktop (Mac and Windows):I’m also going to work on a permanent fix for this.
@lmakarov, Any luck with this?
@gconry18 stick with 2.1.0.5 until we figure out and release a workaround.
I have seen this also. The weird thing is that if I go to the website for the project it starts up fine.