如何将Xcode Docker化 [英] How to dockerize Xcode

查看:786
本文介绍了如何将Xcode Docker化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

出于CI的目的,我需要建立一个能够构建iOS应用程序的构建从属集群.现在,我仅依靠一台MacMini -旨在将来部署更多MacMini -我想在其之上虚拟化多个从属.这些虚拟奴隶中的一些将构建iOS应用,而其他一些则将成为较小的Linux从属.

For CI purposes I have a need to set up a cluster of build slaves capable of building iOS apps. For now I'm relying on a single MacMini -with the aim to deploy several more in the future- and I'd like to virtualize several slaves on top of it. Some of these virtual slaves will build the iOS app, others will be smaller Linux slaves for miscellaneous purposes.

我是Docker的新手,所以我的主要问题是是否可以对Xcode 9.2和/或MacOS进行Docker化以虚拟化我的iOS构建从属.我几乎看不到关于是否可以实现这一目标的文献,并且我在hub.docker.com中找到了一些图像,但是它们没有记录在案,而且似乎不太受欢迎.

I'm completely new to Docker, so my main question is whether it's possible to dockerize Xcode 9.2 and/or MacOS in order to virtualize my iOS build slaves. I've seen very little literature out there on whether this can be achieved and I've found some images in hub.docker.com but they're not documented and don't appear to be very popular.

我现在正在阅读Docker教程,最终将尝试这样做-如果我成功了,我将在这里回答自己的问题以造福他人-但由于缺乏信息,我对此表示怀疑关于是否有可能甚至应该从哪里开始.

I'm going through a Docker tutorial right now and eventually will be attempting this -and if I'm successful I'll be answering my own question here for the benefit of others- but given the lack of information I have doubts on whether it is even possible or where I should even start.

任何对此的提示或指示,将不胜感激. 或者,如果有人事实上知道这是不可能的并且可以解释原因,那也可以节省很多时间.

Any tips or pointers on this would be greatly appreciated. Or if anyone knows for fact that this is not possible and can explain why, that would also save me a lot of time.

推荐答案

OS X不使用Linux内核,因此无法在Docker容器中运行

OS X does not use the Linux kernel, so it cannot run in a Docker container

XCode不是开源的,并且没有Linux安装程序,因此不能在Linux Docker映像中使用.

XCode is not open-sourced and does not have a Linux installer, so it cannot be used in a Linux Docker image.

似乎最好的选择是使用类似 packer-macos osx-vm-templates 并将其集成到您的管道中.

It seems like your best bet is to build a Packer template using something like packer-macos osx-vm-templates and integrate that into your pipeline.

这篇关于如何将Xcode Docker化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆