Can I run Xcode in a docker container?

Can I run Xcode in a docker container? I'd like to dockerise an Xcode CI system, just wondering if this is possible.


This answer is now likely to be out of date as it was written in 2015. It may still be useful as reference to reproduce the same

--

This repo from Docker Hackathon 2015 describes how to build and run iOS apps with the docker client. Is that what you're after?

Watch the video:

  • https://www.youtube.com/watch?v=CGHOH9Ocl1k

Secret sauce is in server.js that implements a REST API to simulate a docker server. So in fact it's not actually running iOS in a real Linux docker server - rather it implements the docker API and then acts as a proxy to ios-sim (run) and XCode (build).


Look at Docker-OSX which runs macOS with Xcode support inside Docker.

You can connect to that macOS via SSH or VNC and use Xcode on Linux