Skip to content

Commit 7b27830

Browse files
[Cherrypick] Update onebranch Dockerfile for windows agent #2159 to release/0.11 (#2160)
Cherrypick #2159 to `release/0.11` ## Why make this change? - We were getting the error message "no matching manifest for windows/amd64 10.0.20348 in the manifest list entries". - the problem is that the Docker image we're trying to pull (mcr.microsoft.com/dotnet/aspnet:6.0-cbl-mariner2.0) does not support the architecture of our Docker host (Windows/amd64). - The 6.0-cbl-mariner2.0 tag of the dotnet/aspnet image is designed for the CBL-Mariner (Common Base Linux) operating system, which is a Linux distribution developed by Microsoft. This image will not work on a Windows host of our onebranch pipeline. ## What is this change? - changed the base images from Linux-based images to Windows-based images. - `mcr.microsoft.com/dotnet/aspnet:6.0` ## How was this tested? - [X] pipeline passing Co-authored-by: Abhishek Kumar <102276754+abhishekkumams@users.noreply.github.com>
1 parent dc55ef5 commit 7b27830

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

onebranch/Dockerfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#
2+
# Build Data API builder Docker container in OneBranch
3+
#
4+
# Version values referenced from https://hub.docker.com/_/microsoft-dotnet-aspnet
5+
# dotnet/sdk and dotnet/aspnet required to build working container.
6+
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
7+
WORKDIR /src
8+
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS runtime
9+
10+
# The ./src/out path below points to the finalized build bits created by the pipeline.
11+
# The path is relative to the "Docker build context" specified by the parameter dockerFileContextPath
12+
# in task: onebranch.pipeline.imagebuildinfo@1
13+
# The "Docker build context" contains all the files that will be used by the command "docker build"
14+
# OneBranch uses the injected task Copy Artifacts to
15+
# copy artifacts from pipeline artifacts: "/mnt/{...}/out"
16+
# to the container running the docker tasks: /mnt/{...}/docker/artifacts/
17+
COPY ./src/out/engine/net6.0 /App
18+
19+
# Change working directory to the /App folder within the Docker image and configure
20+
# how Data Api buider is started when the container runs.
21+
WORKDIR /App
22+
ENV ASPNETCORE_URLS=http://+:5000
23+
ENTRYPOINT ["dotnet", "Azure.DataApiBuilder.Service.dll"]

0 commit comments

Comments
 (0)