-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
explicit building docker image for arm64
- Loading branch information
1 parent
b4ffa4f
commit a63ceb2
Showing
2 changed files
with
25 additions
and
2 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,24 @@ | ||
# Use a multi-stage build to build and publish the .NET application | ||
# Specify the initial base architecture (amd64 in this case) | ||
FROM mcr.microsoft.com/dotnet/sdk:8.0-jammy-arm64v8 AS build-env | ||
WORKDIR /repo/src | ||
|
||
# Copy everything else and build | ||
COPY ./src/ /repo/src/ | ||
COPY ./LICENSE.TXT /repo/LICENSE.txt | ||
|
||
RUN dotnet clean | ||
RUN dotnet restore | ||
RUN dotnet build -o /out/AasxServerBlazor AasxServerBlazor -v diag | ||
RUN dotnet publish -c Release -v diag --no-restore | ||
|
||
# Use a runtime image to run the application | ||
# Specify the initial base architecture (amd64 in this case) | ||
FROM mcr.microsoft.com/dotnet/aspnet:8.0-jammy-arm64v8 as base | ||
RUN apt update && apt upgrade --yes | ||
RUN apt install -y curl nano libgdiplus | ||
EXPOSE 5001 | ||
COPY --from=build-env /out/AasxServerBlazor/ /AasxServerBlazor/ | ||
COPY ./content-for-demo/ /AasxServerBlazor/ | ||
WORKDIR /AasxServerBlazor | ||
ENTRYPOINT ["/bin/bash", "-c", "./startForDemo.sh"] |