mirror of
https://github.com/sickcodes/Docker-OSX.git
synced 2026-01-13 13:53:28 +01:00
Running Xcode Build #228
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @maxlapides on GitHub (Jul 23, 2021).
OS related issued, please help us identify the issue by posting the output of this
Hey there! This is an awesome project. I've successfully created a deduped.img file following the CI/CD instructions.
I am now trying to use this .img file to run my Xcode build. So, here's what I'm running:
This results in a
(qemu)command prompt, but I'm not sure what to do with that. I thought theOSX_COMMANDSwould be run and output, but that doesn't seem to happen here. Do you have any recommendations on what my next steps should be?Thanks again! Really appreciate the work on this!
@maxlapides commented on GitHub (Jul 24, 2021):
Not sure if this is helpful, but this is what I'm seeing!
@sickcodes commented on GitHub (Jul 24, 2021):
-e "OSX_COMMANDS=/bin/bash -c \"pwd && uname -a\"" \Is a demo command, you can change it to something else:
-e "OSX_COMMANDS=/bin/bash -c \"echo hello\""The container will delete itself after running the commands, or you can remove that line
@maxlapides commented on GitHub (Jul 24, 2021):
I think this is where I'm a bit confused. Here's what I just ran:
And here's the result:
It never terminates, and I never see "hello" logged. I feel like I'm so so close to having this working!
@sickcodes commented on GitHub (Jul 24, 2021):
My container will only work in full auto with the OSX_COMMANDS if you make the user account
archand the passwordalpine.Try that and you can use the full auto version, but you'll also need to build using the
Dockerfile.auto@maxlapides commented on GitHub (Jul 25, 2021):
Okay I read through the
Dockerfile.autoand I think I understand better now. In the above example, OSX_COMMANDS isn't working because I'm building my Docker image from:naked. Thanks for that tip!So, now I'm trying a different approach where I run my docker-osx container by itself and then have my CI tasks SSH into that container to run various scripts. Locally, I am testing out SSH first by running this:
And then after that starts up, outside of the container I can run:
And that works!
I can also run:
This also works 😄
So next I configured my Kubernetes-based CI system to use a
readinessProbeto determine whether macOS is ready:I also configured all the same environment variables:
As expected, the probe fails until macOS is ready. It sends this error:
But ultimately, the probe starts returning a different error:
And that's where I'm currently stuck! This may be a configuration mistake in my CI system, but I'm not sure right now. Any ideas are welcome :)
@maxlapides commented on GitHub (Jul 25, 2021):
Oh one more potentially useful clue, the logs for the docker-osx container end like this:
@sickcodes commented on GitHub (Jul 26, 2021):
Remove OSX_COMMANDS to get a shell, only in
:autoExample: https://github.com/sickcodes/Docker-OSX#prebuilt-image-with-arbitrary-command-line-arguments
@Eslam-mohammed-anwar commented on GitHub (Sep 25, 2022):
@maxlapides Did you end up running it for CICD pipelines , if you please share any heads up
@maxlapides commented on GitHub (Sep 26, 2022):
@Eslam-mohammed-anwar I did eventually figure out the issue here. The root cause is that the readiness probe that I wrote is no good.