diff --git a/.github/workflows/preview_ci.yml b/.github/workflows/preview_ci.yml index a6793263c5a..504b6e404cf 100644 --- a/.github/workflows/preview_ci.yml +++ b/.github/workflows/preview_ci.yml @@ -76,6 +76,6 @@ jobs: Get-ChildItem ./src/OrchardCore.Cms.Web/App_Data_Tests -Recurse | Remove-Item -Recurse -Confirm:$false $output = [System.IO.Path]::GetFullPath("./.build/release") dotnet publish -c Release --property:PublishDir=$output --no-build --framework net8.0 - docker build -f Dockerfile-CI -t orchardproject/orchardcore-cms-windows:dev . + docker build -f Dockerfile-CI --platform=windows/amd64 -t orchardproject/orchardcore-cms-windows:dev . echo "${{ secrets.DOCKERHUB_PASSWORD }}" | docker login -u="${{ secrets.DOCKERHUB_USERNAME }}" --password-stdin docker push orchardproject/orchardcore-cms-windows:dev diff --git a/.github/workflows/release_ci.yml b/.github/workflows/release_ci.yml index ec3a628ad47..0bb7c250211 100644 --- a/.github/workflows/release_ci.yml +++ b/.github/workflows/release_ci.yml @@ -88,7 +88,7 @@ jobs: Get-ChildItem ./src/OrchardCore.Cms.Web/App_Data_Tests -Recurse | Remove-Item -Recurse -Confirm:$false $output = [System.IO.Path]::GetFullPath("./.build/release") dotnet publish -c Release --property:PublishDir=$output --no-build --framework net8.0 - docker build -f Dockerfile-CI -t orchardproject/orchardcore-cms-windows:latest -t orchardproject/orchardcore-cms-windows:${{ steps.get_version.outputs.VERSION }} . + docker build -f Dockerfile-CI --platform=windows/amd64 -t orchardproject/orchardcore-cms-windows:latest -t orchardproject/orchardcore-cms-windows:${{ steps.get_version.outputs.VERSION }} . echo "${{ secrets.DOCKERHUB_PASSWORD }}" | docker login -u="${{ secrets.DOCKERHUB_USERNAME }}" --password-stdin docker push orchardproject/orchardcore-cms-windows:latest docker push "orchardproject/orchardcore-cms-windows:${{ steps.get_version.outputs.VERSION }}" diff --git a/Dockerfile b/Dockerfile index d0ac1442191..0a1bde8436d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,4 @@ +ARG TARGETOS=linux FROM --platform=$TARGETOS golang:alpine AS build FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env diff --git a/Dockerfile-CI b/Dockerfile-CI index eb8ce347a9d..786af3c0312 100644 --- a/Dockerfile-CI +++ b/Dockerfile-CI @@ -1,6 +1,6 @@ # This Docker file is intended for the CI # A prerequisite is a published application in the .build/release - +ARG TARGETOS=linux FROM --platform=$TARGETOS golang:alpine AS build FROM mcr.microsoft.com/dotnet/aspnet:8.0-nanoserver-1809 AS build_windows