Skip to content

Commit 22314a4

Browse files
committed
Add arm64 Dockerfile for macOS
1 parent 3ce4c14 commit 22314a4

File tree

3 files changed

+45
-0
lines changed

3 files changed

+45
-0
lines changed

.github/workflows/dockerimage.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ on:
1212
- 'Dockerfile.i386'
1313
- 'Dockerfile.armhf'
1414
- 'Dockerfile.arm64'
15+
- 'Dockerfile.osx-x64'
16+
- 'Dockerfile.osx-arm64'
1517

1618
jobs:
1719
build:
@@ -26,6 +28,10 @@ jobs:
2628
dockerfile: Dockerfile.armhf
2729
- tag: arm64
2830
dockerfile: Dockerfile.arm64
31+
- tag: osx-x64
32+
dockerfile: Dockerfile.osx-x64
33+
- tag: osx-arm64
34+
dockerfile: Dockerfile.osx-arm64
2935
runs-on: ubuntu-latest
3036
steps:
3137
- uses: actions/checkout@v3

Dockerfile.osx-arm64

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
FROM jetbrains/teamcity-minimal-agent:latest
2+
3+
# This is important for using apt-get
4+
USER root
5+
6+
# Install cross-build dependencies
7+
RUN apt-get update && \
8+
apt-get install -y --no-install-recommends ca-certificates subversion ncftp \
9+
git autoconf wget make patch cmake clang llvm-dev uuid-dev libssl-dev lzma-dev libxml2-dev python3
10+
11+
# Prepare cross-build environment
12+
ENV MACOSX_DEPLOYMENT_TARGET=11.0 \
13+
PATH="${PATH}:/opt/osxcross/bin" \
14+
OSXCROSS_MP_INC=1
15+
16+
RUN mkdir -p /opt/osxcross && \
17+
git clone https://github.com/tpoechtrager/osxcross.git /opt/osxcross/setup_files && \
18+
cd /opt/osxcross/setup_files && \
19+
wget -P tarballs https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX11.3.sdk.tar.xz && \
20+
UNATTENDED=1 TARGET_DIR=/opt/osxcross ./build.sh && \
21+
UNATTENDED=1 ../bin/osxcross-macports install --arm64 mysql8 libidn2
22+
23+
# Default build configuration
24+
ENV AS_BUILDAGENT=0 \
25+
BUILD_ARCHITECTURE=arm64 \
26+
BUILD_CONFIG=release \
27+
AR=arm64-apple-darwin20.4-ar \
28+
CC=arm64-apple-darwin20.4-clang \
29+
CXX=arm64-apple-darwin20.4-clang++
30+
31+
# Set build directory
32+
VOLUME /build
33+
WORKDIR /build
34+
35+
# Copy entrypoint script
36+
COPY utils/docker-entrypoint-osx.sh /docker-entrypoint.sh
37+
38+
# Set entrypoint
39+
ENTRYPOINT /docker-entrypoint.sh
File renamed without changes.

0 commit comments

Comments
 (0)