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

Related issues

Hendrik-H picture Hendrik-H  路  3Comments

dimsav picture dimsav  路  3Comments

HackerWilson picture HackerWilson  路  3Comments

leiblix picture leiblix  路  3Comments

29e7e280-0d1c-4bba-98fe-f7cd3ca7500a picture 29e7e280-0d1c-4bba-98fe-f7cd3ca7500a  路  3Comments