Compose: Create and mount data-only containers with docker-compose

Created on 14 Mar 2016  路  1Comment  路  Source: docker/compose

Docker 1.9 introduced a new volume API for creating data only containers (via docker volume create).
Is it possible to create those and mount them via docker-compose?

I would like to create a data only container to store data from my MySQL database (https://hub.docker.com/_/mysql/). Sadly I couldn't find any documentation whether it is possible with docker-compose itself.

arevolumes kinquestion

Most helpful comment

docker volume create is used to create "named volumes" (which are not quite the same as data only containers).

Compose does support this. See https://docs.docker.com/compose/compose-file/#volume-configuration-reference

>All comments

docker volume create is used to create "named volumes" (which are not quite the same as data only containers).

Compose does support this. See https://docs.docker.com/compose/compose-file/#volume-configuration-reference

Was this page helpful?
0 / 5 - 0 ratings