diff --git a/content/manuals/build/building/best-practices.md b/content/manuals/build/building/best-practices.md index c3d42b9a96..8a099fbb6b 100644 --- a/content/manuals/build/building/best-practices.md +++ b/content/manuals/build/building/best-practices.md @@ -98,7 +98,7 @@ download of base images and dependencies. ```dockerfile # syntax=docker/dockerfile:1 FROM ubuntu:24.04 -RUN apt-get -y update && apt-get install -y python +RUN apt-get -y update && apt-get install -y --no-install-recommends python3 ``` Also consider [pinning base image versions](#pin-base-image-versions). @@ -165,7 +165,7 @@ review. Adding a space before a backslash (`\`) helps as well. Here’s an example from the [buildpack-deps image](https://github.com/docker-library/buildpack-deps): ```dockerfile -RUN apt-get update && apt-get install -y \ +RUN apt-get update && apt-get install -y --no-install-recommends \ bzr \ cvs \ git \ @@ -322,7 +322,7 @@ For example, you can chain commands with the `&&` operator, and use escape characters to break long commands into multiple lines. ```dockerfile -RUN apt-get update && apt-get install -y \ +RUN apt-get update && apt-get install -y --no-install-recommends \ package-bar \ package-baz \ package-foo @@ -337,7 +337,7 @@ with a pipeline operator: ```dockerfile RUN <