This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

It provide function of mounting local directories on the VirtualBox instance with mount option. Using Docker Toolbox.

Install

Need Docker Toolbox.

$ pip install docker-volume

How to use it

Configuration

$REPO_ROOT/docker-volume.yml

volumes:
  mysql:
    hostpath: ${here}/../volumes/mysql/
    vboxpath: /var/lib/mysql
    uid: 0
    gid: 0
    dmode: 777
  mongo:
    hostpath: ${here}/../volumes/mongo/
    vboxpath: /var/lib/mongo
    uid: 0
    gid: 0
    dmode: 777
  redis:
    hostpath: ${here}/../volumes/redis/
    vboxpath: /var/lib/redis
    uid: 0
    gid: 0
    dmode: 777

Add volume

$ docker-volume add
EXECUTE: VBoxManage sharedfolder add default --name docker-example_redis --hostpath /path/to/hostdir/volumes/redis
EXECUTE: VBoxManage sharedfolder add default --name docker-example_mysql --hostpath /path/to/hostdir/volumes/mysql
EXECUTE: VBoxManage sharedfolder add default --name docker-example_mongo --hostpath /path/to/hostdir/volumes/mongo

Mount volume

Start docker machine.

$ docker-machine start default
(dev) Starting VM...
Machine "default" was started.
Started machines may have new IP addresses. You may need to re-run the `docker-machine env` command.

mount volume.

$ docker-volume mount
EXECUTE: docker-machine ssh default "sudo mkdir -p /var/lib/mysql &&  sudo mount -t vboxsf -o uid=0,gid=0,dmode=777 docker-example_mysql /var/lib/mysql"
EXECUTE: docker-machine ssh default "sudo mkdir -p /var/lib/mongo &&  sudo mount -t vboxsf -o uid=0,gid=0,dmode=777 docker-example_mongo /var/lib/mongo"
EXECUTE: docker-machine ssh default "sudo mkdir -p /var/lib/redis &&  sudo mount -t vboxsf -o uid=0,gid=0,dmode=777 docker-example_redis /var/lib/redis"

Make sure that it is mounted.

$ docker-machine ssh default "mount | grep /var/lib"
/dev/sda1 on /mnt/sda1/var/lib/docker/aufs type ext4 (rw,relatime,data=ordered)
none on /var/lib/mongo type vboxsf (rw,nodev,relatime)
none on /var/lib/redis type vboxsf (rw,nodev,relatime)
none on /var/lib/mysql type vboxsf (rw,nodev,relatime)

Unmount volume

Unmount volume.

$ docker-volume unmount
EXECUTE: docker-machine ssh default "sudo umount /var/lib/redis"
EXECUTE: docker-machine ssh default "sudo umount /var/lib/mysql"
EXECUTE: docker-machine ssh default "sudo umount /var/lib/mongo"

Make sure that it is unmounted.

$ docker-machine ssh default "mount | grep /var/lib"
/dev/sda1 on /mnt/sda1/var/lib/docker/aufs type ext4 (rw,relatime,data=ordered)

Remove volume

Stop docker machine.

$ docker-machine stop
(dev) Stopping VM...
Machine "default" was stopped.

Remove volume.

$ docker-volume remove
EXECUTE: VBoxManage sharedfolder remove default --name docker-example_mongo
EXECUTE: VBoxManage sharedfolder remove default --name docker-example_mysql
EXECUTE: VBoxManage sharedfolder remove default --name docker-example_redis

Volume name

Volume name is ${REPOSITORY_DIRECTORY_NAME}_${VOLUME_NAME}.

Other

If you want to specify the machine name it?

It specifies the -m or –machine option.

$ docker-volume add --dry-run --machine example
EXECUTE: VBoxManage sharedfolder add example --transient --name docker-volume_repo --hostpath /path/to/hostdir/volumes/docker-volume
EXECUTE: VBoxManage sharedfolder add example --transient --name docker-volume_spam --hostpath /path/to/hostdir/volumes/spam
EXECUTE: VBoxManage sharedfolder add example --transient --name docker-volume_ham --hostpath /path/to/hostdir/volumes/ham

If you want to specify the single volume?

It will specify a volume name if you want to operate a volume.

$ docker-volume add --dry-run spam
EXECUTE: VBoxManage sharedfolder add default --transient --name docker-volume_spam --hostpath /path/to/hostdir/volumes/spam

and it will specify two volume name if you want to operate two volumes.

$ docker-volume add --dry-run spam ham
EXECUTE: VBoxManage sharedfolder add default --transient --name docker-volume_spam --hostpath /path/to/hostdir/volumes/spam
EXECUTE: VBoxManage sharedfolder add default --transient --name docker-volume_ham --hostpath /path/to/hostdir/volumes/ham

If you do not specify a volume name, all volumes are operation.

Development

Source code repository: https://pypi.python.org/pypi/docker-volume

Release History

Release History

0.4.post1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3.dev1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3.dev0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.dev1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.dev3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.dev2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.dev1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.dev0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
docker_volume-0.4.post1-py3-none-any.whl (17.2 kB) Copy SHA256 Checksum SHA256 3.5 Wheel Jun 23, 2016
docker-volume-0.4.post1.tar.gz (8.9 kB) Copy SHA256 Checksum SHA256 Source Jun 23, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting