Skip to content
This repository was archived by the owner on Mar 30, 2020. It is now read-only.

Commit 738a54e

Browse files
committed
Merge pull request #20 from herveleclerc/master
Volumes and VolumesFrom feature
2 parents 93e91bc + 7e4ec1b commit 738a54e

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

core/docker.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,8 @@ func (d *Docker) startContainer(p *Project, c *Container) error {
290290
PortBindings: ports,
291291
RestartPolicy: restartPolicy,
292292
Links: d.formatLinks(p.Links),
293-
VolumesFrom: p.Volumes,
293+
VolumesFrom: p.VolumesFrom,
294+
Binds: p.Binds,
294295
})
295296
}
296297

core/project.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ type Project struct {
2929
NoCache bool
3030
Restart string
3131
Ports []string `gcfg:"Port"`
32-
Volumes []string `gcfg:"Volume"`
32+
Binds []string `gcfg:"Volume"`
33+
VolumesFrom []string `gcfg:"VolumeFrom"`
3334
Links map[string]*Link `json:"-"`
3435
LinkNames []LinkDefinition `gcfg:"Link"`
3536
LinkedBy []*Project `json:"-"`

documentation/configuration.md

+1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ An environment is a logical group of any number of Docker servers. Dockership su
7474
* `Restart` (optional, default: no): restart policy to apply when a container exits (no, on-failure[:max-retry], always) (like --restart at `docker run`)
7575
* `Link` (multiple, optional): creates a Link to other project, when this project is deployed the linked projects are restarted (like -P at `docker run`)
7676
* `Volume` (multiple, optional): mounts a Data Volume Container (like -v at `docker run`)
77+
* `VolumeFrom` (multiple, optional): mounts a Data Volumes From a specified container (like --volumes-from at `docker run`)
7778
* `GithubToken` (default: Global.GithubToken): the token needed to access this repository, if it is different from the global one.
7879
* `Environment` (multiple, mandatory): Environment name where this project could be deployed
7980
* `WebHook` (optional): An HTTP address. See [Extending Dockership](https://github.com/mcuadros/dockership/blob/master/documentation/extending_dockership.md#web-hooks) for details.

0 commit comments

Comments
 (0)