{"push_id":1144408431,"size":1,"distinct_size":1,"ref":"refs/heads/add_mounts_api_on_create","head":"9d97a4e5973998219e58f900cf53f7abad426f2f","before":"08d02cc70eef113c95284e5ba00f1da26dd764e1","commits":[{"sha":"9d97a4e5973998219e58f900cf53f7abad426f2f","author":{"name":"Brian Goff","email":"7c85cf8ae7443f547a26fb59a1f52171e1274aa1@gmail.com"},"message":"Add new `HostConfig` field, `Mounts`.\n\n`Mounts` allows users to specify in a much safer way the volumes they\nwant to use in the container.\nThis replaces `Binds` and `Volumes`, which both still exist, but\n`Mounts` and `Binds`/`Volumes` are exclussive.\nThe CLI will continue to use `Binds` and `Volumes` due to concerns with\nparsing the volume specs on the client side and cross-platform support.\n\nExample usage of `Mounts`:\n\n```\n$ curl -XPOST localhost:2375/containers/create -d '{\n  \"Image\": \"alpine:latest\",\n  \"HostConfig\": {\n    \"Mounts\": [{\n      \"Type\": \"Volume\",\n      \"Destination\": \"/foo\"\n      },{\n      \"Type\": \"bind\",\n      \"Source\": \"/var/run/docker.sock\",\n      \"Destination\": \"/var/run/docker.sock\",\n      },{\n      \"Type\": \"volume\",\n      \"Name\": \"important_data\",\n      \"Target\": \"/var/data\",\n      \"Mode\": \"ro\"\n      \"Volume\": {\n\t\"Driver\": \"awesomeStorage\",\n\t\"DriverOpts\": { \"Size\": \"10G\" }\n\t}\n      }]\n    }\n}'\n```\n\nThere are currently 2 types of mounts:\n\n  - **bind**: Paths on the host that get mounted into the\n    container. Paths must exist prior to creating the container.\n  - **volume**: Volumes that persist after the\n    container is removed.\n\nNot all fields are available in each type, and validation is done to\nensure these fields aren't mixed up between types.\n\nSigned-off-by: Brian Goff <cpuguy83@gmail.com>","distinct":true,"url":"https://api.github.com/repos/cpuguy83/docker/commits/9d97a4e5973998219e58f900cf53f7abad426f2f"}]}
{"actor":{"display_login":"cpuguy83"}}