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
48.63k stars 2.71k forks source link

Failed to connect to raw.githubusercontent.com port 443 after 6 ms: Couldn't connect to server #831

Open wxp0821 opened 3 weeks ago

wxp0821 commented 3 weeks ago

this isssue is caused by -e MASTER_PLIST_URL='https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-custom.plist' \ can the file config-custom.plist be aquired by local flask request? I tried to build a flask app. when I visit http://hellodocker:5000/config-custom.plist,I can get the file config-custom.plist. However, when I run docker-compose up --build -d, an error occurred 4 audio: Could not create a backend for voice adc' 2024-10-30 13:12:34 gtk initialization failed

docker-compose.yml `services: hellodocker: image: hellodocker container_name: hellodocker ports:

networks: macos: driver: bridge

from flask import Flask, send_file

app = Flask(name)

visit_count = 0

@app.route('/') def index(): global visit_count visit_count += 1 return f" {visit_count} "

@app.route('/config-custom.plist') def serve_plist(): return send_file('config-custom.plist', mimetype='application/xml')

if name == "main": app.run(host='0.0.0.0', port=5000, debug=True)

OS related issued, please help us identify the issue by posting the output of this

uname -a \ ; echo "${DISPLAY}" \ ; echo 1 | sudo tee /sys/module/kvm/parameters/ignore_msrs \ ; grep NAME /etc/os-release \ ; df -h . \ ; qemu-system-x86_64 --version \ ; libvirtd --version \ ; free -mh \ ; nproc \ ; egrep -c '(svm|vmx)' /proc/cpuinfo \ ; ls -lha /dev/kvm \ ; ls -lha /tmp/.X11-unix/ \ ; ps aux | grep dockerd \ ; docker ps | grep osx \ ; grep "docker|kvm|virt" /etc/group

IamMattM commented 3 days ago

@wxp0821

I can see that you are also using docker-compose rather than the docker run commands listed in the github guides. This is also my case and I have also faced the same issue as you with regards to pulling the `MASTER_PLIST_URL The container uses curl and there is a specific way to make sure that it is "parsed" correctly.

You need to create a .env file in the samme location as the docker-osx docker-compose.yml.


The .env file should simply contain this line: (no quotes) MASTER_PLIST_URL=http://hellodocker:5000/config-custom.plist

The docker-compose.yml should be re-syntaxed like so: - MASTER_PLIST_URL=${MASTER_PLIST_URL}


Try it if you have not yet done so. It worked for me.