Hello, as I am starting to play with docker and docker-compose, I want to ask please, how do I get docker-computer to use /mnt/user/appdata/ for named volumes.
I make a nice yml to get joomla to run with mysql linked and this does work.
GNU nano 4.6 test.yml
version: '3.1'
services:
joomla:
image: joomla
restart: always
ports:
- 8080:80
environment:
JOOMLA_DB_HOST: joomladb
JOOMLA_DB_PASSWORD: xxxxxx
JOOMLA_DB_NAME: Joomla
volumes:
- www-data:/var/www/html
joomladb:
image: mysql:5.6
restart: always
environment:
MYSQL_ROOT_PASSWORD: xxxxxx
volumes:
- db-data:/var/lib/mysql
volumes:
db-data:
www-data:
The problem is that this mounts on the standard location and not to /mnt/user/appdata.
root@Tower:/mnt/user/www/docker-compose# docker volume inspect docker-compose_db-data
[
{
"CreatedAt": "2020-07-17T20:56:32+01:00",
"Driver": "local",
"Labels": {
"com.docker.compose.project": "docker-compose",
"com.docker.compose.version": "1.25.5",
"com.docker.compose.volume": "db-data"
},
"Mountpoint": "/var/lib/docker/volumes/docker-compose_db-data/_data",
"Name": "docker-compose_db-data",
"Options": null,
"Scope": "local"
Is there a way to change "/var/lib/docker/volumes/docker-compose_db-data/_data". into "/mnt/user/data". as standard behaviour.