Skip to content

Fix "Duplicate volume mount" error when config has trailing slashes - #1787

Merged
aanand merged 1 commit into
docker:masterfrom
aanand:fix-duplicate-volume-bind
Jul 30, 2015
Merged

aanand merged 1 commit into
docker:masterfrom
aanand:fix-duplicate-volume-bind

Conversation

@aanand

@aanand aanand commented Jul 29, 2015

Copy link
Copy Markdown

When an image declares a volume such as /var/lib/mysql, and a Compose file has a line like ./data:/var/lib/mysql/ (note the trailing slash), Compose creates duplicate volume binds when recreating the container. (The first container is created without a hitch, but contains multiple entries in its "Volumes" config.)

Fixed by normalizing all paths in volumes config.

Closes #1785.

When an image declares a volume such as `/var/lib/mysql`, and a Compose
file has a line like `./data:/var/lib/mysql/` (note the trailing slash),
Compose creates duplicate volume binds when *recreating* the container.
(The first container is created without a hitch, but contains multiple
entries in its "Volumes" config.)

Fixed by normalizing all paths in volumes config.

Signed-off-by: Aanand Prasad <[email protected]>
@dnephin

dnephin commented Jul 29, 2015

Copy link
Copy Markdown

LGTM

aanand added a commit that referenced this pull request Jul 30, 2015
Fix "Duplicate volume mount" error when config has trailing slashes
@aanand
aanand merged commit dc7bdd1 into docker:master Jul 30, 2015
@aanand
aanand deleted the fix-duplicate-volume-bind branch July 30, 2015 08:59
aanand added a commit to aanand/fig that referenced this pull request Jul 31, 2015
Fix "Duplicate volume mount" error when config has trailing slashes
(cherry picked from commit dc7bdd1)

Signed-off-by: Aanand Prasad <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants