-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d488042
commit bccba35
Showing
3 changed files
with
65 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Use the official .NET SDK image from Microsoft as the build environment | ||
FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine AS build | ||
|
||
# Set the working directory in the container | ||
WORKDIR /app | ||
|
||
# Copy everything | ||
COPY . . | ||
|
||
# Restore as distinct layers | ||
RUN dotnet restore dotnet-test-rerun.csproj /p:DockerBuild=true | ||
# Build and publish a release | ||
RUN dotnet publish dotnet-test-rerun.csproj /p:DockerBuild=true -c Release -o out | ||
|
||
# Build the runtime image | ||
FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine AS runtime | ||
|
||
# Set the working directory in the runtime container | ||
WORKDIR /app | ||
|
||
# Copy the published application from the build container to the runtime container | ||
COPY --from=build /app/out ./ | ||
|
||
# Set the entry point for the application | ||
ENTRYPOINT ["dotnet", "test-rerun.dll"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters