dotnet / dotnet-buildtools-prereqs-docker

Used to maintain the Docker images hosted at the mcr.microsoft.com/dotnet-buildtools/prereqs image repository
MIT License
53 stars 99 forks source link

Define ROOTFS_ARGs outside of stages #1066

Closed jkoritzinsky closed 1 week ago

jkoritzinsky commented 1 month ago
          I think you can define the arg outside a stage scope to have a single shared default value.  You sill have to declare the ARG in each stage it is used.  This will avoid having "/crossrootfs/arm" defined in multiple locations.

Example

ARG ROOTFS_DIR=/crossrootfs/arm

FROM stageA ARG ROOTFS_DIR

FROM stageB ARG ROOTFS_DIR

_Originally posted by @MichaelSimons in https://github.com/dotnet/dotnet-buildtools-prereqs-docker/pull/1065#discussion_r1606782931_