From d356cef183c88eea12bb5f53c6dc9a2d59d29806 Mon Sep 17 00:00:00 2001 From: Marc Diethelm Date: Sat, 27 Apr 2019 14:17:59 +0200 Subject: [PATCH 1/2] Adds an example how to specify a Dockerfile for deployment --- docs/deployment/methods/dockerfiles.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/deployment/methods/dockerfiles.md b/docs/deployment/methods/dockerfiles.md index 4a8458fa9..4433c6cb5 100644 --- a/docs/deployment/methods/dockerfiles.md +++ b/docs/deployment/methods/dockerfiles.md @@ -26,6 +26,7 @@ For security reasons - and as per [Docker recommendations](https://github.com/do For users that require customization in the `build` phase, you may use build arguments via the [docker-options plugin](docs/advanced-usage/docker-options.md): ```shell +dokku docker-options:add node-js-app build '--file Dockerfile.dokku' # e.g. to use alternate Dockerfile dokku docker-options:add node-js-app build '--build-arg NODE_ENV=production' ``` From 6006303409323bea5d95983d6790501efb0d9719 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 12 May 2019 18:58:28 -0400 Subject: [PATCH 2/2] docs: clarify that a dockerfile is still needed [ci skip] --- docs/deployment/methods/dockerfiles.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/deployment/methods/dockerfiles.md b/docs/deployment/methods/dockerfiles.md index 4433c6cb5..3139474dd 100644 --- a/docs/deployment/methods/dockerfiles.md +++ b/docs/deployment/methods/dockerfiles.md @@ -26,10 +26,15 @@ For security reasons - and as per [Docker recommendations](https://github.com/do For users that require customization in the `build` phase, you may use build arguments via the [docker-options plugin](docs/advanced-usage/docker-options.md): ```shell -dokku docker-options:add node-js-app build '--file Dockerfile.dokku' # e.g. to use alternate Dockerfile dokku docker-options:add node-js-app build '--build-arg NODE_ENV=production' ``` +The location of the `Dockerfile` may also be specified. If the location is changed, the repository **must also** have a `Dockerfile` in the root directory in order to trigger a dockerfile-based deploy. + +```shell +dokku docker-options:add node-js-app build '--file Dockerfile.dokku' +``` + Once set, the Dockerfile usage would be as follows: ```Dockerfile