Skip to content

Commit

Permalink
Fix docker build (#14737)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeAlhayek authored Nov 22, 2023
1 parent fa2a9b2 commit 261a069
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/preview_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,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-linux:dev .
docker build -f Dockerfile-CI --platform=linux/amd64 -t orchardproject/orchardcore-cms-linux:dev .
docker push orchardproject/orchardcore-cms-linux:dev
- name: Deploy preview docker image for windows
if: matrix.os == 'windows-latest'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,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-linux:latest -t orchardproject/orchardcore-cms-linux:${{ steps.get_version.outputs.VERSION }} .
docker build -f Dockerfile-CI --platform=linux/amd64 -t orchardproject/orchardcore-cms-linux:latest -t orchardproject/orchardcore-cms-linux:${{ steps.get_version.outputs.VERSION }} .
docker push orchardproject/orchardcore-cms-linux:latest
docker push "orchardproject/orchardcore-cms-linux:${{ steps.get_version.outputs.VERSION }}"
- name: Deploy preview docker image for windows
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG TARGETOS=linux
FROM --platform=$TARGETOS golang:alpine AS build
FROM --platform=$BUILDPLATFORM golang:alpine AS build
ARG TARGETOS

FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
LABEL stage=build-env
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile-CI
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# 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 --platform=$BUILDPLATFORM golang:alpine AS build
ARG TARGETOS

FROM mcr.microsoft.com/dotnet/aspnet:8.0-nanoserver-1809 AS build_windows
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS build_linux
Expand Down

0 comments on commit 261a069

Please sign in to comment.