Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
feat(using_dockerfiles): document build args feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Fisher committed Mar 22, 2017
1 parent 2269596 commit 259a3f8
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/applications/using-dockerfiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,28 @@ Use `deis scale cmd=3` to increase `cmd` processes to 3, for example. Scaling a
process type directly changes the number of [containers][container]
running that process.


## Docker Build Arguments

As of Workflow v2.13.0, users can inject their application config into the Docker image using
[Docker build arguments][build-args]. To opt into this, users must add a new environment variable
to their application:

```
$ deis config:set DEIS_DOCKER_BUILD_ARGS_ENABLED=1
```

Every environment variable set with `deis config:set` will then be available for use inside the
user's Dockerfile. For example, if a user runs `deis config:set POWERED_BY=Workflow`,
the user can utilize that build argument in their Dockerfile:

```
ARG POWERED_BY
RUN echo "Powered by $POWERED_BY" > /etc/motd
```


[build-args]: https://docs.docker.com/engine/reference/commandline/build/#set-build-time-variables---build-arg
[container]: ../reference-guide/terms.md#container
[controller]: ../understanding-workflow/components.md#controller
[Dockerfile]: https://docs.docker.com/reference/builder/
Expand Down

0 comments on commit 259a3f8

Please sign in to comment.