From d5293c2191f94643a52eb1736da136fbf5ee5185 Mon Sep 17 00:00:00 2001 From: Wojtek Wrona Date: Fri, 12 Jul 2019 23:08:46 +0200 Subject: [PATCH] Update dockerfile_best-practices.md (#7336) LGTM, thanks! --- develop/develop-images/dockerfile_best-practices.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/develop/develop-images/dockerfile_best-practices.md b/develop/develop-images/dockerfile_best-practices.md index 6beacdc26b..0cdc2c4e83 100644 --- a/develop/develop-images/dockerfile_best-practices.md +++ b/develop/develop-images/dockerfile_best-practices.md @@ -867,7 +867,7 @@ like `RUN groupadd -r postgres && useradd --no-log-init -r -g postgres postgres` Avoid installing or using `sudo` as it has unpredictable TTY and signal-forwarding behavior that can cause problems. If you absolutely need functionality similar to `sudo`, such as initializing the daemon as `root` but -running it as non-`root`), consider using ["gosu"](https://github.com/tianon/gosu). +running it as non-`root`, consider using [“gosu”](https://github.com/tianon/gosu). Lastly, to reduce layers and complexity, avoid switching `USER` back and forth frequently. @@ -896,7 +896,7 @@ A Docker build executes `ONBUILD` commands before any command in a child `ONBUILD` is useful for images that are going to be built `FROM` a given image. For example, you would use `ONBUILD` for a language stack image that builds arbitrary user software written in that language within the -`Dockerfile`, as you can see in [Ruby’s `ONBUILD` variants](https://github.com/docker-library/ruby/blob/master/2.4/jessie/onbuild/Dockerfile). +`Dockerfile`, as you can see in [Ruby’s `ONBUILD` variants](https://github.com/docker-library/ruby/blob/c43fef8a60cea31eb9e7d960a076d633cb62ba8d/2.4/jessie/onbuild/Dockerfile). Images built from `ONBUILD` should get a separate tag, for example: `ruby:1.9-onbuild` or `ruby:2.0-onbuild`.