-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Labels
area-dockerfilesConcerns the official .NET Dockerfiles or Dockerfile templatesConcerns the official .NET Dockerfiles or Dockerfile templates
Description
We should ensure that our Dockerfiles adhere to consistent rules for formatting:
- There should be 1 newline between instructions, and 2 newlines between stages. Example of where we use two lines between instructions:
dotnet-docker/src/runtime-deps/7.0/cbl-mariner2.0-distroless/amd64/Dockerfile
Lines 29 to 32 in c161034
&& tac $tmpManifestPath | gawk '!x[$1]++' | sort > /staging/var/lib/rpmmanifest/container-manifest-2 # Create a non-root user and group - Arguments to commands should be in alphabetical order. Example where they aren't:
dotnet-docker/src/runtime-deps/7.0/cbl-mariner2.0-distroless/amd64/Dockerfile
Lines 34 to 35 in c161034
--system \ --gid=101 \ - The alphabetical order for arguments should also extend to things like lists of packages to install:
dotnet-docker/src/runtime-deps/7.0/cbl-mariner2.0-distroless/amd64/Dockerfile
Lines 15 to 20 in c161034
glibc \ krb5 \ libgcc \ libstdc++ \ openssl-libs \ zlib \
(I didn't find a place where we violated this).
Metadata
Metadata
Assignees
Labels
area-dockerfilesConcerns the official .NET Dockerfiles or Dockerfile templatesConcerns the official .NET Dockerfiles or Dockerfile templates
Type
Projects
Status
Backlog