Skip to content
This repository has been archived by the owner on Jul 6, 2018. It is now read-only.

Need volume support for machine_image #75

Open
dullyouth opened this issue Jan 25, 2016 · 1 comment
Open

Need volume support for machine_image #75

dullyouth opened this issue Jan 25, 2016 · 1 comment

Comments

@dullyouth
Copy link

My current use case is when installing mysql while provisioning an image and having "/data/mysql:/var/lib/mysql" defined as a volume for persistence of the mysql db between container runs.

When the machine_image is being created, the volumes are not defined so mysql is installed in the local fs rather than to the persistent mount point.

When a machine is brought up from that image and the volumes are mounted, it mounts an empty /data/mysql directory, since the mysql db was installed on the local fs.

chef:mysql image while running machine_image create/chef-client

 "Volumes": {},
 "VolumesRW": {}

container running from chef:mysql image

  "Volumes": {
        "/dev/log": "/tmp/syslogdev/log",
        "/var/lib/mysql-default": "/data/mysql"
    },
    "VolumesRW": {
        "/dev/log": true,
        "/var/lib/mysql-default": true
    }

Please let me know if I need to clarify any of that.

@jkeiser
Copy link
Contributor

jkeiser commented Mar 15, 2016

@dullyouth #83 supports all docker options and . Mind trying that branch (jk/more-options) to see if it serves your needs?

machine_options docker_options: { volume: [ ] } should let you specify the same things you put on the docker command line.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants