Hi,
I used docker volume create as follow:
docker volume create --name dbstore
If I run from cli I can mount successfully
docker run -d -v dbstore:/container/path/for/volume container_image my_command
but I can’t figure out how to run in docker compose:
My docker-compse.yml looks like this:
mysql:
container_name: mysql
image: mysql:5.6
environment:
- MYSQL_ROOT_PASSWORD=admin
- MYSQL_DATABASE=sp_schema
volumes_from:
- dbstore
I get the following error:
docker-compose up
ERROR: Service “mysql” mounts volumes from “dbstore”, which is not the name of a service or container.
Here is the output from docker volume ls:
DRIVER VOLUME NAME
local dbstore
Is docker volume not supported in docker compose?