Describe the Bug
Change in the MS build command overrides Dockerfile ARG BEAM_DOTNET_VERSION.
Arguments passed in with --build-arg will override default definitions in the Dockerfile, they are used only if not present in the --build-arg.
This results in the inability to use any other base image for the MS.
To Reproduce
Steps to reproduce the behavior:
- Create new CLI 7 project
- Create new MS
- Change
ARG BEAM_DOTNET_VERSION in the Dockerfile to 10.0-noble
- After
FROM mcr.microsoft.com/dotnet/runtime:${BEAM_DOTNET_VERSION} add:
RUN apt-get update && apt-get install -y git (arbitrary noble command)
- Run
dotnet beam deploy plan
Expected Behavior
dotnet beam deploy plan should execute successfully with 10.0-noble base image.
Actual Behavior
dotnet beam deploy plan fails because it uses hard-coded 10.0-alpine base image.
Screenshots
Failed to build service=[GfxService]
starting docker build...
[internal] load build definition from Dockerfile
transferring dockerfile:
[internal] load metadata for mcr.microsoft.com/dotnet/runtime:10.0-alpine
[internal] load .dockerignore
transferring context:
[1/6] FROM mcr.microsoft.com/dotnet/runtime:10.0-alpine@sha256:df50bf8048e1d38c9b9d757eeeac29ce966f9df5f4bd394452189673928ad640
[internal] load build context
resolve mcr.microsoft.com/dotnet/runtime:10.0-alpine@sha256:df50bf8048e1d38c9b9d757eeeac29ce966f9df5f4bd394452189673928ad640
[2/6] RUN apt-get update && apt-get install -y git
/bin/sh: apt-get: not found
[failed] process "/bin/sh -c apt-get update && apt-get install -y git" did not complete successfully: exit code: 127
Describe the Bug
Change in the MS build command overrides Dockerfile
ARG BEAM_DOTNET_VERSION.Arguments passed in with
--build-argwill override default definitions in the Dockerfile, they are used only if not present in the--build-arg.This results in the inability to use any other base image for the MS.
To Reproduce
Steps to reproduce the behavior:
ARG BEAM_DOTNET_VERSIONin the Dockerfile to10.0-nobleFROM mcr.microsoft.com/dotnet/runtime:${BEAM_DOTNET_VERSION}add:RUN apt-get update && apt-get install -y git(arbitrary noble command)dotnet beam deploy planExpected Behavior
dotnet beam deploy planshould execute successfully with10.0-noblebase image.Actual Behavior
dotnet beam deploy planfails because it uses hard-coded10.0-alpinebase image.Screenshots