Skip to content

Commit

Permalink
another way
Browse files Browse the repository at this point in the history
  • Loading branch information
davidleonm committed Nov 19, 2024
1 parent 8840038 commit 82f8262
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/on-push-to-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ jobs:
uses: KageKirin/get-csproj-version@v1
with:
file: ./Code/src/WeatherStationProject.Dashboard.App/WeatherStationProject.Dashboard.App.csproj
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: linux/arm64
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
# with:
# platforms: linux/arm64
- name: Build and push Dashboard
id: push
uses: docker/build-push-action@v6
Expand All @@ -51,6 +51,7 @@ jobs:
"PROJECT_NAME_ARG=WeatherStationProject.Dashboard.App"
"ENVIRONMENT_ARG=Production"
file: ./Dockerfile
platforms: linux/arm64
push: true
tags: |
weatherstationproject/dashboard:${{ steps.dashboard_version.outputs.version }}
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG PROJECT_NAME_ARG
ARG ENVIRONMENT_ARG

# Pull down the image with .NET Core SDK
FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine-arm64v8 AS Build
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS Build
LABEL maintainer="David Leon <david.leon.m@gmail.com>"

# Global args re-mapped for this stage
Expand All @@ -24,7 +24,7 @@ WORKDIR "/src/$PROJECT_NAME_ARG"
RUN dotnet publish "./$PROJECT_NAME_ARG.csproj" --configuration Release --output "/app/publish"

# Pull down the image which includes only the ASP.NET core runtime
FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine-arm64v8
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/aspnet:8.0-alpine

# Install needed app
RUN apk add --no-cache curl
Expand Down

0 comments on commit 82f8262

Please sign in to comment.