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:
|
&& 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:
- The alphabetical order for arguments should also extend to things like lists of packages to install:
|
glibc \ |
|
krb5 \ |
|
libgcc \ |
|
libstdc++ \ |
|
openssl-libs \ |
|
zlib \ |
(I didn't find a place where we violated this).
We should ensure that our Dockerfiles adhere to consistent rules for formatting:
dotnet-docker/src/runtime-deps/7.0/cbl-mariner2.0-distroless/amd64/Dockerfile
Lines 29 to 32 in c161034
dotnet-docker/src/runtime-deps/7.0/cbl-mariner2.0-distroless/amd64/Dockerfile
Lines 34 to 35 in c161034
dotnet-docker/src/runtime-deps/7.0/cbl-mariner2.0-distroless/amd64/Dockerfile
Lines 15 to 20 in c161034
(I didn't find a place where we violated this).