Skip to content

Commit 812c142

Browse files
Reverting Original Docker file (#2182)
## Why make this change? - This is redundant and we need to preserve the original dockerfile as someone could be still using it. ## What is this change? - Reverting this file to the original Dockerfile. Since we already have onebranch related Dockerfile: https://github.com/Azure/data-api-builder/blob/main/onebranch/Dockerfile
1 parent 91ed92d commit 812c142

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

Dockerfile

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,15 @@
1-
#
2-
# Build and copy GraphQL binaries and run them.
3-
#
41
# Version values referenced from https://hub.docker.com/_/microsoft-dotnet-aspnet
52

63
FROM mcr.microsoft.com/dotnet/sdk:6.0-cbl-mariner2.0. AS build
4+
5+
76
WORKDIR /src
8-
FROM mcr.microsoft.com/dotnet/aspnet:6.0-cbl-mariner2.0 AS runtime
7+
COPY [".", "./"]
8+
RUN dotnet build "./src/Service/Azure.DataApiBuilder.Service.csproj" -c Docker -o /out -r linux-x64
99

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
10+
FROM mcr.microsoft.com/dotnet/aspnet:6.0-cbl-mariner2.0 AS runtime
1811

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.
12+
COPY --from=build /out /App
2113
WORKDIR /App
2214
ENV ASPNETCORE_URLS=http://+:5000
2315
ENTRYPOINT ["dotnet", "Azure.DataApiBuilder.Service.dll"]

0 commit comments

Comments
 (0)