Skip to content

Instantly share code, notes, and snippets.

@radimih
Created April 11, 2022 06:11
Show Gist options
  • Save radimih/cc928abcb403d6cfb59a7d478e7978f4 to your computer and use it in GitHub Desktop.
Save radimih/cc928abcb403d6cfb59a7d478e7978f4 to your computer and use it in GitHub Desktop.
Значение аргумента в зависимости от значения другого аргумента
# Если задан build-аргумент CICD (любое непустое значение), то брать .NET-образы
# из зеркала Docker Registry (Nexus), иначе из Microsoft Container Registry
ARG CICD
ARG DOTNET_MIRROR_REGISTRY=${CICD:+dotnet}
ARG DOTNET_DOCKER_REGISTRY=${DOTNET_MIRROR_REGISTRY:-mcr.microsoft.com/dotnet}
#-------------------------------------------------------------------------------
FROM ${DOTNET_DOCKER_REGISTRY}/sdk:5.0 AS build
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment