Container for iOS build system for CI/CD #78

Closed
opened 2025-12-29 05:21:33 +01:00 by adam · 24 comments
Owner

Originally created by @mapo80 on GitHub (Oct 8, 2020).

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?

Originally created by @mapo80 on GitHub (Oct 8, 2020). 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?
adam closed this issue 2025-12-29 05:21:33 +01:00
Author
Owner

@sickcodes commented on GitHub (Oct 9, 2020):

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.

@sickcodes commented on GitHub (Oct 9, 2020): 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.
Author
Owner

@mapo80 commented on GitHub (Oct 10, 2020):

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

@mapo80 commented on GitHub (Oct 10, 2020): Ok, thanks for your answer. I’ll try to install Xcode
Author
Owner

@mapo80 commented on GitHub (Oct 11, 2020):

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

@mapo80 commented on GitHub (Oct 11, 2020): I’m trying to install docker on azure and Ubuntu server but docker doesn’t start. DonI have to use Ubuntu desktop version?
Author
Owner

@sickcodes commented on GitHub (Oct 11, 2020):

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

@sickcodes commented on GitHub (Oct 11, 2020): Follow the instructions about which docker to install. Has to be docker-ce as docker is something else in the ubuntu repo
Author
Owner
@sickcodes commented on GitHub (Oct 11, 2020): https://docs.microsoft.com/en-us/azure/virtual-machines/windows/nested-virtualization
Author
Owner

@mapo80 commented on GitHub (Oct 12, 2020):

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

@mapo80 commented on GitHub (Oct 12, 2020): 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
Author
Owner

@sickcodes commented on GitHub (Oct 18, 2020):

Great write up btw :)

@sickcodes commented on GitHub (Oct 18, 2020): Great write up btw :)
Author
Owner

@mapo80 commented on GitHub (Oct 18, 2020):

It works 💪🏻💪🏻

@mapo80 commented on GitHub (Oct 18, 2020): It works 💪🏻💪🏻
Author
Owner

@lequanghuylc commented on GitHub (Nov 19, 2020):

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

@lequanghuylc commented on GitHub (Nov 19, 2020): 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
Author
Owner

@sickcodes commented on GitHub (Nov 19, 2020):

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 on GitHub (Nov 19, 2020): > 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 :)
Author
Owner

@sickcodes commented on GitHub (Nov 23, 2020):

Fastlane inside Docker-OSX btw

@sickcodes commented on GitHub (Nov 23, 2020): Fastlane inside Docker-OSX btw
Author
Owner

@marcellodesales commented on GitHub (Mar 27, 2021):

@sickcodes any news on this? Any reference?

@marcellodesales commented on GitHub (Mar 27, 2021): @sickcodes any news on this? Any reference?
Author
Owner

@Nathan187 commented on GitHub (Apr 12, 2021):

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

  • sudo chown 1000:1000 /dev/kvm
    ++ id -u
    ++ id -g
  • sudo chown -R 1000:1000 /dev/snd

  • ++ id -u
    ++ id -g
  • sudo chown -R 1000:1000 /dev/snd
  • exec qemu-system-x86_64 -m 12000 -cpu Penryn,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check -machine q35,accel=kvm:tcg -smp 4,cores=4 -usb -device usb-kbd -device usb-tablet -device 'isa-applesmc,osk=ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc' -drive if=pflash,format=raw,readonly,file=/home/arch/OSX-KVM/OVMF_CODE.fd -drive if=pflash,format=raw,file=/home/arch/OSX-KVM/OVMF_VARS-1024x768.fd -smbios type=2 -audiodev alsa,id=hda -device ich9-intel-hda -device hda-duplex,audiodev=hda -device ich9-ahci,id=sata -drive id=OpenCoreBoot,if=none,snapshot=on,format=qcow2,file=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2 -device ide-hd,bus=sata.2,drive=OpenCoreBoot -device ide-hd,bus=sata.3,drive=InstallMedia -drive id=InstallMedia,if=none,file=/home/arch/OSX-KVM/BaseSystem.img,format=qcow2 -drive id=MacHDD,if=none,file=/home/arch/OSX-KVM/mac_hdd_ng.img,format=qcow2 -device ide-hd,bus=sata.4,drive=MacHDD -netdev user,id=net0,hostfwd=tcp::10022-:22,hostfwd=tcp::5900-:5900, -device vmxnet3,netdev=net0,id=net0,mac=52:54:00:09:49:17 -monitor stdio -vga vmware
    qemu-system-x86_64: warning: dbind: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-24v3n0jJfR: Connection refused
    QEMU 5.2.0 monitor - type 'help' for more information
    (qemu) qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000007H:EDX.invtsc [bit 8]
    qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000007H:EDX.invtsc [bit 8]
    qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000007H:EDX.invtsc [bit 8]
    qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000007H:EDX.invtsc [bit 8]
    ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
    ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
    ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
    ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
    ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
    ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
    ALSA lib conf.c:5233:(snd_config_expand) Evaluate error: No such file or directory
    ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM default
    alsa: Could not initialize DAC
    alsa: Failed to open default': alsa: Reason: No such file or directory ALSA lib confmisc.c:767:(parse_card) cannot find card '0' ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5233:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM default alsa: Could not initialize DAC alsa: Failed to open default':
    alsa: Reason: No such file or directory
    audio: Failed to create voice dac' ALSA lib confmisc.c:767:(parse_card) cannot find card '0' ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5233:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM default alsa: Could not initialize ADC alsa: Failed to open default':
    alsa: Reason: No such file or directory
    ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
    ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
    ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
    ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
    ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
    ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
    ALSA lib conf.c:5233:(snd_config_expand) Evaluate error: No such file or directory
    ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM default
    alsa: Could not initialize ADC
    alsa: Failed to open default': alsa: Reason: No such file or directory audio: Failed to create voice adc'

(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

@Nathan187 commented on GitHub (Apr 12, 2021): 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 + sudo chown 1000:1000 /dev/kvm ++ id -u ++ id -g + sudo chown -R 1000:1000 /dev/snd + [[ 12 = max ]] + [[ 12 = half ]] ++ id -u ++ id -g + sudo chown -R 1000:1000 /dev/snd + exec qemu-system-x86_64 -m 12000 -cpu Penryn,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check -machine q35,accel=kvm:tcg -smp 4,cores=4 -usb -device usb-kbd -device usb-tablet -device 'isa-applesmc,osk=ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc' -drive if=pflash,format=raw,readonly,file=/home/arch/OSX-KVM/OVMF_CODE.fd -drive if=pflash,format=raw,file=/home/arch/OSX-KVM/OVMF_VARS-1024x768.fd -smbios type=2 -audiodev alsa,id=hda -device ich9-intel-hda -device hda-duplex,audiodev=hda -device ich9-ahci,id=sata -drive id=OpenCoreBoot,if=none,snapshot=on,format=qcow2,file=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2 -device ide-hd,bus=sata.2,drive=OpenCoreBoot -device ide-hd,bus=sata.3,drive=InstallMedia -drive id=InstallMedia,if=none,file=/home/arch/OSX-KVM/BaseSystem.img,format=qcow2 -drive id=MacHDD,if=none,file=/home/arch/OSX-KVM/mac_hdd_ng.img,format=qcow2 -device ide-hd,bus=sata.4,drive=MacHDD -netdev user,id=net0,hostfwd=tcp::10022-:22,hostfwd=tcp::5900-:5900, -device vmxnet3,netdev=net0,id=net0,mac=52:54:00:09:49:17 -monitor stdio -vga vmware qemu-system-x86_64: warning: dbind: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-24v3n0jJfR: Connection refused QEMU 5.2.0 monitor - type 'help' for more information (qemu) qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000007H:EDX.invtsc [bit 8] qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000007H:EDX.invtsc [bit 8] qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000007H:EDX.invtsc [bit 8] qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000007H:EDX.invtsc [bit 8] ALSA lib confmisc.c:767:(parse_card) cannot find card '0' ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5233:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM default alsa: Could not initialize DAC alsa: Failed to open `default': alsa: Reason: No such file or directory ALSA lib confmisc.c:767:(parse_card) cannot find card '0' ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5233:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM default alsa: Could not initialize DAC alsa: Failed to open `default': alsa: Reason: No such file or directory audio: Failed to create voice `dac' ALSA lib confmisc.c:767:(parse_card) cannot find card '0' ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5233:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM default alsa: Could not initialize ADC alsa: Failed to open `default': alsa: Reason: No such file or directory ALSA lib confmisc.c:767:(parse_card) cannot find card '0' ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5233:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM default alsa: Could not initialize ADC alsa: Failed to open `default': alsa: Reason: No such file or directory audio: Failed to create voice `adc' (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
Author
Owner

@marcellodesales commented on GitHub (Apr 12, 2021):

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

@marcellodesales commented on GitHub (Apr 12, 2021): @sickcodes @Nathan187 I'm looking for the same here... OSX with Fastlane installed on the same Docker image :)
Author
Owner

@marcellodesales commented on GitHub (Apr 12, 2021):

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

@marcellodesales commented on GitHub (Apr 12, 2021): @lequanghuylc did you get anything since last year on the OSX + fastlane base docker image? (before user setup an account)?
Author
Owner

@Nathan187 commented on GitHub (Apr 12, 2021):

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

@Nathan187 commented on GitHub (Apr 12, 2021): @marcellodesales not sure what you're asking. i just saw this the other day and trying to get it to work
Author
Owner

@princefishthrower commented on GitHub (Mar 25, 2022):

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

@princefishthrower commented on GitHub (Mar 25, 2022): @marcellodesales , @Nathan187 - any luck here? If this is possible, it will be revolutionary... (at least for our DevOps processes 😂 )
Author
Owner

@marcellodesales commented on GitHub (Mar 25, 2022):

@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 :)

@marcellodesales commented on GitHub (Mar 25, 2022): @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 :)
Author
Owner

@sickcodes commented on GitHub (Mar 26, 2022):

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

@sickcodes commented on GitHub (Mar 26, 2022): I'm waiting on "the cloud" to approve my entity
Author
Owner

@princefishthrower commented on GitHub (Mar 27, 2022):

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

@princefishthrower commented on GitHub (Mar 27, 2022): 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
Author
Owner

@mrkeyiano commented on GitHub (Jun 30, 2022):

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

@mrkeyiano commented on GitHub (Jun 30, 2022): please @sickcodes any updates on this (Docker-OSX with fastlane, xcode and gradlew installed
Author
Owner

@angel-urena commented on GitHub (Dec 31, 2022):

@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.

@angel-urena commented on GitHub (Dec 31, 2022): @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.
Author
Owner

@tomerh2001 commented on GitHub (Feb 12, 2024):

@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?

@tomerh2001 commented on GitHub (Feb 12, 2024): > @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?
Author
Owner

@broomfn commented on GitHub (Jul 24, 2024):

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?

@broomfn commented on GitHub (Jul 24, 2024): > 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?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Docker-OSX-sickcodes#78