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
46.78k stars 2.54k forks source link

Container for iOS build system for CI/CD #92

Closed mapo80 closed 3 years ago

mapo80 commented 4 years ago

Thanks for your work, I think that this could be a good solution to create a system to build iOS AppStore’s be used for CI/CD. Could be compared to solutions like ORKA and

Anka vs Orka : https://veertu.com/comparing-anka-and-orka/

I want to create a docker image with Xcode installed and try to use it to build iOS apps, I think that GUI is not important but we need ssh and I’ve seen that you support it. Another great feature to have is suspending the machine in this way will be faster to startup OS and speed up build time of iOS application. Do you think that is it possible to create a new container with these features?

I don’t have a Linux machine, can I run this docker on a Mac to make some tries?

sickcodes commented 4 years ago

All of the above already possible.

Start a VNC container as per the comments in the VNC folder.

Install Xcode.

Run the auto boot script.

Docker commit.

Copy, duplicate or move the image freely in the state you leave it at docker commit.

mapo80 commented 4 years ago

Ok, thanks for your answer. I’ll try to install Xcode

mapo80 commented 4 years ago

I’m trying to install docker on azure and Ubuntu server but docker doesn’t start. DonI have to use Ubuntu desktop version?

sickcodes commented 4 years ago

Follow the instructions about which docker to install. Has to be docker-ce as docker is something else in the ubuntu repo

sickcodes commented 4 years ago

https://docs.microsoft.com/en-us/azure/virtual-machines/windows/nested-virtualization

mapo80 commented 4 years ago

Hi @sickcodes, after many tries I succeeded to install this docker on Azure. Here is "how to": https://write.as/insanelydev/install-docker-osx-on-azure

sickcodes commented 3 years ago

Great write up btw :)

mapo80 commented 3 years ago

It works 💪🏻💪🏻

lequanghuylc commented 3 years ago

Hi @mapo80 did you succeed in setup CI/CD iOS build? Can you share your docker hub image and a basic ios build commands? I'm imagining you installed xcode, nodejs, react native, pod and fastlane

sickcodes commented 3 years ago

Hi @mapo80 did you succeed in setup CI/CD iOS build? Can you share your docker hub image and a basic ios build commands? I'm imagining you installed xcode, nodejs, react native, pod and fastlane

He shouldn't share his image because it has his OSX keys, Apple ID, and data. I recommend fastlane and xsign :)

sickcodes commented 3 years ago

Fastlane inside Docker-OSX btw

marcellodesales commented 3 years ago

@sickcodes any news on this? Any reference?

Nathan187 commented 3 years ago

i followed these instructions step by step and kept getting this error

docker run --device /dev/kvm -e RAM=12 -p 50922:10022 -v /tmp/.X11-unix:/tmp/.X11-unix -e "DISPLAY=${DISPLAY:-:0.0}" sickcodes/docker-osx:latest

touch: cannot touch '': No such file or directory chown: cannot access '': No such file or directory ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519 ++ id -u ++ id -g

(qemu:19): Gdk-ERROR **: 19:25:30.080: The program 'qemu' received an X Window System error. This probably reflects a bug in the program. The error was 'BadAccess (attempt to access private resource denied)'. (Details: serial 209 error_code 10 request_code 130 (MIT-SHM) minor_code 1) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the GDK_SYNCHRONIZE environment variable to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) /bin/bash: line 1: 19 Trace/breakpoint trap (core dumped) /bin/bash -c ./Launch.sh

marcellodesales commented 3 years ago

@sickcodes @Nathan187 I'm looking for the same here... OSX with Fastlane installed on the same Docker image :)

marcellodesales commented 3 years ago

@lequanghuylc did you get anything since last year on the OSX + fastlane base docker image? (before user setup an account)?

Nathan187 commented 3 years ago

@marcellodesales not sure what you're asking. i just saw this the other day and trying to get it to work

princefishthrower commented 2 years ago

@marcellodesales , @Nathan187 - any luck here? If this is possible, it will be revolutionary... (at least for our DevOps processes 😂 )

marcellodesales commented 2 years ago

@princefishthrower Absolutely :) Still on the dream... I could make it work on a Linux host :) But I wanted to run via Docker-For-Desktop in a Mac :) I agree, I was contributing something to GitLab for Flutter Apps :)

sickcodes commented 2 years ago

I'm waiting on "the cloud" to approve my entity

princefishthrower commented 2 years ago

I may set up a playground Bitbucket pipeline to try and build just a fresh react native app... I'll report back if I have any success

mrkeyiano commented 2 years ago

please @sickcodes any updates on this (Docker-OSX with fastlane, xcode and gradlew installed

angel-urena commented 1 year ago

@princefishthrower Did you have any success using this in a Bitbucket Pipeline? I'm interested in accomplishing a similar setup and figuring out if it's feasible.

tomerh2001 commented 8 months ago

@princefishthrower Did you have any success using this in a Bitbucket Pipeline? I'm interested in accomplishing a similar setup and figuring out if it's feasible.

Any updates regarding this?

broomfn commented 2 months ago

Hi @sickcodes, after many tries I succeeded to install this docker on Azure. Here is "how to": https://write.as/insanelydev/install-docker-osx-on-azure

I assume this is in breach of macOS license whereby you can only run it on Apple hardware?