Using data-only containers in Docker

Documentation: http://docs.docker.com/userguide/dockervolumes/

Create a data only container and then use it in another container:

docker run -v /data --name="lfs_data" ubuntu
docker run -i -t --volumes-from=lfs_data 32bit/acm /bin/bash

The first command creates a container named “lfs_data”

The second command runs a container “32bit/acm” and uses the ldf_data data container. I can go to /data create a file and exit the container, and the file will still be there.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s