Skip to content

Commit 5d1bc32

Browse files
committed
Added note about docker-library ONBUILD variant deprecation.
Signed-off-by: Brett Randall <javabrett@gmail.com>
1 parent f3689fa commit 5d1bc32

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

develop/develop-images/dockerfile_best-practices.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -763,8 +763,13 @@ Images built from `ONBUILD` should get a separate tag, for example:
763763

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

769774
## Examples for Official Repositories
770775

0 commit comments

Comments
 (0)