sickcodes / Docker-OSX

Run macOS VM in a Docker! Run near native OSX-KVM in Docker! X11 Forwarding! CI/CD for OS X Security Research! Docker mac Containers.
https://hub.docker.com/r/sickcodes/docker-osx
GNU General Public License v3.0
45.97k stars 2.45k forks source link

[Question] How to install Xcode on this docker? #81

Open amadeu01 opened 4 years ago

amadeu01 commented 4 years ago

This might be a stupid question, but I don't have much experience with docker. And, I would like to run some scripts which are basically to build an app inside the docker. I don't know if that would be possible. But, since the docker can run an osx, it might be possible to run Xcode and so run tests or build apps.

How could I install the xcode inside the container? I was thinking about using Ansible to configure the container like here

sickcodes commented 4 years ago

Yes you can docker commit the image when it's ready to ship.

It would be the same as duplicating your hard drive.

sickcodes commented 4 years ago

Sorry for not answering your question 🤣

Yes it's possible, you can build your container. Once it's nice and ready, use docker commit or put the .img somewhere, I have updated the readme

sickcodes commented 4 years ago

Feel free to close this when you have it working

amadeu01 commented 4 years ago

@sickcodes thanks! I'll give a try!

Just one more question to be clear if I understood. I could configure the mac image with all programs I like and then I make a copy of that image with docke commit? Therefore, if I had installed Xcode on the initial image, after the docker commit I'll have a new image with the xcode ready to be used ?

sickcodes commented 3 years ago

FYI you need to install Xcode from the App Store, which requires you to sign in with an Apple ID.

You can create one in OSX

yaroslavnikiforov commented 3 years ago

Hi @sickcodes is it possible to create an image with Xcode installed, commit it to the Docker hub, and then use it for the bitbucket pipelines for creating iOS builds? Thanks

sickcodes commented 3 years ago

It certainly is. Be careful with your keys. You can also use fastlane I believe.

Or this https://github.com/zhlynn/zsign

yaroslavnikiforov commented 3 years ago

Great thanks!

sickcodes commented 3 years ago

Hi @sickcodes is it possible to create an image with Xcode installed, commit it to the Docker hub, and then use it for the bitbucket pipelines for creating iOS builds? Thanks

FYI Working on this currently

rafaldziuryk commented 2 years ago

Hi @sickcodes is it possible to create an image with Xcode installed, commit it to the Docker hub, and then use it for the bitbucket pipelines for creating iOS builds? Thanks

@yaroslavnikiforov Did you find a way to run this docker image with bitbucket pipeline? Could you share some tips if so?

sickcodes commented 2 years ago

You need to create your own image first and then you can automate usage with the naked image or naked-auto