Skip to content

Commit

Permalink
Added note about docker-library ONBUILD variant deprecation.
Browse files Browse the repository at this point in the history
Signed-off-by: Brett Randall <[email protected]>
  • Loading branch information
javabrett committed Sep 4, 2018
1 parent 401d0e5 commit ad1f58d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions develop/develop-images/dockerfile_best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -763,8 +763,13 @@ Images built from `ONBUILD` should get a separate tag, for example:

Be careful when putting `ADD` or `COPY` in `ONBUILD`. The “onbuild” image
fails catastrophically if the new build's context is missing the resource being
added. Adding a separate tag, as recommended above, helps mitigate this by
allowing the `Dockerfile` author to make a choice.
added. Customizing when the `ONBUILD` instruction executes is also not possible
- it always occurs before the first instruction in the child image build.
Note also that docker-library `ONBUILD` image variants
[have been deprecated](https://github.com/docker-library/official-images/issues/2076).

Adding a separate tag, as recommended above, helps mitigate these limitations
by allowing the `Dockerfile` author to make a choice.

## Examples for Official Repositories

Expand Down

0 comments on commit ad1f58d

Please sign in to comment.