Run codesign tool on Docker

Is there a way to run codesign (macOS) tool on Docker container ?

Answered by DTS Engineer in 720221022

The codesign tool is only available on macOS, so this question boils down to Is it possible to run macOS in a Docker container? I don’t use Docker and so have no insight into that.

Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

The codesign tool is only available on macOS, so this question boils down to Is it possible to run macOS in a Docker container? I don’t use Docker and so have no insight into that.

Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

@idontcare_

I have the right solution for you!

I built a native container system for Mac called MacDocker, where you can run Mach-O binaries straight on macOS. No Linux VM, no emulation and Sandbox/seatbelt isolated.

Have you tried to use your M4's GPU with a Docker container? Or build and sign your Swift code in Xcode it? Short answer: you can't.

Docker Desktop and Apple Container runs a Linux VM, and it sees no Metal, no MPS, no MLX and no XCode.

What Docker Desktop can't do, MacDocker can!

🔥 Real GPU access: PyTorch (MPS) and MLX using Apple Silicon's GPU and unified memory.

🛠️ Xcode in a container: upload your project .zip, get back a .dmg or .ipa signed with your certificate.

⚡ Containers up in ~130 ms: every job starts from an APFS clone (copy-on-write) — disk is used only for what changes.

🔒 Isolated by default: per-job macOS sandbox, dedicated service user, network blocked while running, and caps on memory (GPU included), processes and time.

We are looking for beta testers. https://macdocker.com:8000

Run codesign tool on Docker
 
 
Q