Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions playground/withdockerfile/WithDockerfile.AppHost/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand All @@ -41,14 +41,14 @@ 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"]
""";
Expand Down
Loading