-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
area-dockerfilesConcerns the official .NET Dockerfiles or Dockerfile templatesConcerns the official .NET Dockerfiles or Dockerfile templates
Milestone
Description
In runtime-deps images, we set the environment variables after we install dependencies and other instructions. Since the environment variables basically never change, we should be able to put the ENV instruction before the dependency installation to take advantage of layer caching.
Also, in some runtime-deps Dockerfiles with a non-root user defined, it is defined after the deps install. We should be able to make the same optimization with these instructions too.
Example Dockerfile with potential for both optimizations: https://github.com/dotnet/dotnet-docker/blob/nightly/src/runtime-deps/7.0/cbl-mariner2.0-distroless/amd64/Dockerfile
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-dockerfilesConcerns the official .NET Dockerfiles or Dockerfile templatesConcerns the official .NET Dockerfiles or Dockerfile templates
Type
Projects
Status
Done