Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
davidleonm committed Nov 26, 2024
1 parent 0a47e2e commit 5215e0c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/on-push-to-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ jobs:
"INCLUDE_NPM_ARG=false"
"PROJECT_NAME_ARG=WeatherStationProject.Dashboard.AirParametersService"
"ENVIRONMENT_ARG=Production"
"PLATFORMS_ARG=${{ env.PLATFORMS }}"
file: ./Dockerfile
platforms: ${{ env.PLATFORMS }}
push: true
Expand Down
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@
ARG INCLUDE_NPM_ARG
ARG PROJECT_NAME_ARG
ARG ENVIRONMENT_ARG
ARG PLATFORMS_ARG

# Pull down the image with .NET Core SDK
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build
FROM --platform=$PLATFORMS_ARG 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
ARG INCLUDE_NPM_ARG
ARG PROJECT_NAME_ARG
ARG PLATFORMS_ARG

# Install Node.JS if required
RUN if [[ "$INCLUDE_NPM_ARG" == "true" ]] ; then apk add --no-cache nodejs npm ; fi
Expand All @@ -24,7 +26,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 --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/aspnet:8.0-alpine
FROM --platform=$PLATFORMS_ARG mcr.microsoft.com/dotnet/aspnet:8.0-alpine

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

0 comments on commit 5215e0c

Please sign in to comment.