Skip to content

Commit 41ad5c6

Browse files
committed
Fix windows containers
Signed-off-by: Neil R. Spruit <neil.r.spruit@intel.com>
1 parent a275879 commit 41ad5c6

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

.github/workflows/build-multi.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,24 @@ jobs:
106106
run: |
107107
echo ${{ secrets.GITHUB_TOKEN }} |
108108
docker login -u sys-lzdev --password-stdin ghcr.io
109+
- name: Verify Docker configuration
110+
run: |
111+
docker version
112+
docker info
109113
- name: Build image
110114
run: |
111115
docker info
116+
# Force Docker to use the correct container type
117+
${{ matrix.os.name == 'windows' && 'docker context use default' || '' }}
112118
docker build \
113119
${{ runner.os == 'Windows' && ' \
114120
--memory 16G ' || ' '
115121
}}\
122+
${{ matrix.os.name == 'windows' && ' \
123+
--platform windows/amd64 \
124+
--isolation process ' || ' \
125+
--platform linux/amd64 '
126+
}}\
116127
${{ matrix.os.vmaj != '' && format(' \
117128
--build-arg VMAJ={0} \
118129
--build-arg VMIN={1} ', matrix.os.vmaj, matrix.os.vmin) || ' '
@@ -127,6 +138,11 @@ jobs:
127138
docker run \
128139
--rm \
129140
--interactive \
141+
${{ matrix.os.name == 'windows' && ' \
142+
--platform windows/amd64 \
143+
--isolation process ' || ' \
144+
--platform linux/amd64 '
145+
}}\
130146
-v '${{ github.workspace }}':${MOUNT_TARGET} \
131147
-w ${MOUNT_TARGET}/build \
132148
-e CCACHE_BASEDIR=${MOUNT_TARGET} \

0 commit comments

Comments
 (0)