Skip to content

Commit

Permalink
explicit building docker image for arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderWollbrink authored Sep 15, 2024
1 parent b4ffa4f commit a63ceb2
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build-and-publish-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ jobs:
with:
push: true
load: true
file: ./src/docker/Dockerfile-AasxServerBlazor
platforms: linux/arm64/v8
file: ./src/docker/Dockerfile-AasxServerBlazor-arm64
tags: adminshellio/aasx-server-blazor-for-demo-arm64:latest
github-token: ${{ secrets.GITHUB_TOKEN }}
labels: "version =${{ env.VERSION_NUMBER }}"
Expand Down
24 changes: 24 additions & 0 deletions src/docker/Dockerfile-AasxServerBlazor-arm64
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"]

0 comments on commit a63ceb2

Please sign in to comment.