From 434951028d9bffa8595cabadd036735f893b9490 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 6 Aug 2016 15:44:18 -0400 Subject: [PATCH] Dockerfile deploys do not support mounted volumes [ci skip] --- docs/advanced-usage/persistent-storage.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/advanced-usage/persistent-storage.md b/docs/advanced-usage/persistent-storage.md index b2a1282ac..740a64d00 100644 --- a/docs/advanced-usage/persistent-storage.md +++ b/docs/advanced-usage/persistent-storage.md @@ -66,10 +66,12 @@ Your app may have services that are running in memory and need to be backed up l By default, dokku will only bind storage mounts during the deploy and run phases. Under certain conditions, one might want to bind a storage mount during the build phase. This can be accomplished by using the `docker-options` plugin directly. ```shell -dokku docker-options:add "-v /tmp/python-test:/opt/test" +dokku docker-options:add build "-v /tmp/python-test:/opt/test" ``` -NOTE: **This can cause data loss** if you bind a mount under `/app` in buildpack apps as herokuish will attempt to remove the original app path during the build phase. +You cannot use mounted volumes during the build phase of a Dockerfile deploy. This is because Docker does not support volumes when executing `docker build`. + +> NOTE: **This can cause data loss** if you bind a mount under `/app` in buildpack apps as herokuish will attempt to remove the original app path during the build phase. ## Docker-Options Note