Giter Club home page Giter Club logo

docker-osxcross's Introduction

Latest version Build Status Docker Stars Docker Pulls

Become a sponsor Donate Paypal

About

MacOSX cross toolchain as a Docker image.

Note

Want to be notified of new releases? Check out ๐Ÿ”” Diun (Docker Image Update Notifier) project!

Notice of Non-Affiliation and Disclaimer

This Docker image is not affiliated with Apple Inc. and does not represent Apple's official product, service or practice. Apple is not responsible for and does not endorse this Docker image.

This Docker image is not affiliated with the Xcode project.

Please ensure you have read and understood the Xcode license terms before using it.


Projects using osxcross

Build

git clone https://github.com/crazy-max/docker-osxcross.git
cd docker-osxcross

# Build image and output to docker (default)
docker buildx bake

# Build multi-platform image
docker buildx bake image-all

Image

Registry Image
Docker Hub crazymax/osxcross
GitHub Container Registry ghcr.io/crazy-max/osxcross
$ docker run --rm mplatform/mquery crazymax/osxcross:latest
Image: crazymax/osxcross:latest
 * Manifest List: Yes
 * Supported platforms:
   - darwin/amd64
   - darwin/arm64
   - linux/amd64
   - linux/arm64

Supported tags

alpine, debian and ubuntu variants are available for this image with ubuntu being the default one.

  • edge, edge-ubuntu
  • edge-debian
  • edge-alpine
  • latest, latest-ubuntu, xx.x, xx.x-rx, xx.x-ubuntu, xx.x-rx-ubuntu
  • latest-debian, xx.x-debian, xx.x-rx-debian
  • latest-alpine, xx.x-alpine, xx.x-rx-alpine

Note:

xx.x has to be replaced with one of the MaxOSX releases available (e.g. 11.3). rx has to be replaced with a release number (e.g. r6).

Usage

# syntax=docker/dockerfile:1

ARG OSXCROSS_VERSION=latest
FROM --platform=$BUILDPLATFORM crazymax/osxcross:${OSXCROSS_VERSION}-ubuntu AS osxcross

FROM ubuntu
RUN apt-get update && apt-get install -y clang lld libc6-dev
ENV PATH="/osxcross/bin:$PATH"
ENV LD_LIBRARY_PATH="/osxcross/lib:$LD_LIBRARY_PATH"
RUN --mount=type=bind,from=osxcross,source=/osxcross,target=/osxcross \
      o64-clang ...

With alpine:

# syntax=docker/dockerfile:1

ARG OSXCROSS_VERSION=latest
FROM --platform=$BUILDPLATFORM crazymax/osxcross:${OSXCROSS_VERSION}-alpine AS osxcross

FROM alpine
RUN apk add --no-cache clang lld musl-dev
ENV PATH="/osxcross/bin:$PATH"
ENV LD_LIBRARY_PATH="/osxcross/lib:$LD_LIBRARY_PATH"
RUN --mount=type=bind,from=osxcross,source=/osxcross,target=/osxcross \
      o64-clang ...

darwin/amd64 and darwin/arm64 platforms are also available with the MacOSX SDK in /osxsdk if you want to use it as sysroot with your own toolchain like tonistiigi/xx:

# syntax=docker/dockerfile:1

ARG OSXCROSS_VERSION=latest
FROM crazymax/osxcross:${OSXCROSS_VERSION}-alpine AS osxcross
FROM --platform=$BUILDPLATFORM tonistiigi/xx:1.1.2 AS xx

FROM --platform=$BUILDPLATFORM alpine
COPY --from=xx / /
RUN apk add --no-cache clang lld musl-dev
ARG TARGETPLATFORM
RUN xx-apk add gcc g++ musl-dev
RUN --mount=type=bind,target=. \
    --mount=type=bind,from=osxcross,source=/osxsdk,target=/xx-sdk \
      xx-clang ...

Contributing

Want to contribute? Awesome! The most basic way to show your support is to star the project, or to raise issues. You can also support this project by becoming a sponsor on GitHub or by making a Paypal donation to ensure this journey continues indefinitely!

Thanks again for your support, it is much appreciated! ๐Ÿ™

License

MIT. See LICENSE for more details.

docker-osxcross's People

Contributors

crazy-max avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.