Skip to content

Commit e3538f5

Browse files
committed
fix: use real macOS SDK version 26.1 with robust download
1 parent e3eef98 commit e3538f5

File tree

1 file changed

+17
-20
lines changed

1 file changed

+17
-20
lines changed

v3/internal/setupwizard/docker/Dockerfile.cross

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,28 @@
1-
# Cross-compile Wails v3 apps to any platform
2-
#
3-
# Uses Zig as C compiler + macOS SDK for darwin targets
4-
#
5-
# Usage:
6-
# docker build -t wails-cross -f Dockerfile.cross .
7-
# docker run --rm -v $(pwd):/app wails-cross darwin arm64
8-
# docker run --rm -v $(pwd):/app wails-cross darwin amd64
9-
# docker run --rm -v $(pwd):/app wails-cross linux amd64
10-
# docker run --rm -v $(pwd):/app wails-cross linux arm64
11-
# docker run --rm -v $(pwd):/app wails-cross windows amd64
12-
# docker run --rm -v $(pwd):/app wails-cross windows arm64
13-
141
FROM golang:1.25-alpine
152

3+
ARG ZIG_VERSION=0.14.0
4+
ARG MACOS_SDK_VERSION=26.1
5+
ARG IMAGE_VERSION=1.0.0
6+
7+
LABEL org.opencontainers.image.title="Wails Cross-Compiler"
8+
LABEL org.opencontainers.image.description="Cross-compile Wails v3 apps to macOS, Linux, and Windows"
9+
LABEL org.opencontainers.image.source="https://github.com/wailsapp/wails"
10+
LABEL org.opencontainers.image.vendor="Wails"
11+
LABEL org.opencontainers.image.version="${IMAGE_VERSION}"
12+
LABEL io.wails.sdk.version="${MACOS_SDK_VERSION}"
13+
LABEL io.wails.zig.version="${ZIG_VERSION}"
14+
1615
RUN apk add --no-cache curl xz nodejs npm
1716

18-
# Install Zig
19-
ARG ZIG_VERSION=0.14.0
2017
RUN curl -L "https://ziglang.org/download/${ZIG_VERSION}/zig-linux-x86_64-${ZIG_VERSION}.tar.xz" \
2118
| tar -xJ -C /opt \
2219
&& ln -s /opt/zig-linux-x86_64-${ZIG_VERSION}/zig /usr/local/bin/zig
2320

24-
# Download macOS SDK (required for darwin targets)
25-
ARG MACOS_SDK_VERSION=14.5
26-
RUN curl -L "https://github.com/joseluisq/macosx-sdks/releases/download/${MACOS_SDK_VERSION}/MacOSX${MACOS_SDK_VERSION}.sdk.tar.xz" \
27-
| tar -xJ -C /opt \
28-
&& mv /opt/MacOSX${MACOS_SDK_VERSION}.sdk /opt/macos-sdk
21+
RUN curl -fL --retry 3 --retry-delay 5 -o /tmp/sdk.tar.xz \
22+
"https://github.com/wailsapp/macosx-sdks/releases/download/${MACOS_SDK_VERSION}/MacOSX${MACOS_SDK_VERSION}.sdk.tar.xz" \
23+
&& tar -xJf /tmp/sdk.tar.xz -C /opt \
24+
&& mv /opt/MacOSX${MACOS_SDK_VERSION}.sdk /opt/macos-sdk \
25+
&& rm /tmp/sdk.tar.xz
2926

3027
ENV MACOS_SDK_PATH=/opt/macos-sdk
3128

0 commit comments

Comments
 (0)