diff --git a/playground/withdockerfile/WithDockerfile.AppHost/Program.cs b/playground/withdockerfile/WithDockerfile.AppHost/Program.cs index 89359eb2a38..9b62ee945d6 100644 --- a/playground/withdockerfile/WithDockerfile.AppHost/Program.cs +++ b/playground/withdockerfile/WithDockerfile.AppHost/Program.cs @@ -22,13 +22,13 @@ { var timestamp = DateTime.Now.ToString("yyyyMMddHHmmss", System.Globalization.CultureInfo.InvariantCulture); return $""" - FROM golang:1.22-alpine AS builder + FROM mcr.microsoft.com/oss/go/microsoft/golang:1.23 AS builder WORKDIR /app COPY . . RUN echo "Built at {timestamp}" > /build-info.txt RUN go build -o qots . - FROM alpine:latest + FROM mcr.microsoft.com/cbl-mariner/base/core:2.0 COPY --from=builder /app/qots /qots COPY --from=builder /build-info.txt /build-info.txt ENTRYPOINT ["/qots"] @@ -41,20 +41,21 @@ ENTRYPOINT ["/qots"] { // Simulate reading from a template or external source await Task.Delay(1, context.CancellationToken); - var baseImage = Environment.GetEnvironmentVariable("BASE_IMAGE") ?? "golang:1.22-alpine"; + var baseImage = Environment.GetEnvironmentVariable("BASE_IMAGE") ?? "mcr.microsoft.com/oss/go/microsoft/golang:1.23"; return $""" FROM {baseImage} AS builder WORKDIR /app COPY . . RUN go build -o qots . - FROM alpine:latest + FROM mcr.microsoft.com/cbl-mariner/base/core:2.0 COPY --from=builder /app/qots /qots ENTRYPOINT ["/qots"] """; }); builder.AddRedis("builder-sync") + .WithImageRegistry("netaspireci.azurecr.io") .WithDockerfileBuilder(".", context => { if (!context.Resource.TryGetContainerImageName(useBuiltImage: false, out var imageName)) @@ -66,6 +67,7 @@ ENTRYPOINT ["/qots"] }); builder.AddRedis("builder-async") + .WithImageRegistry("netaspireci.azurecr.io") .WithDockerfileBuilder(".", async context => { await Task.Delay(1, context.CancellationToken);