# Docker + OSX

## Initial setup for Debian

```
# install
sudo apt install qemu qemu-kvm libvirt-clients libvirt-daemon-system bridge-utils virt-manager
sudo systemctl enable --now libvirtd
sudo systemctl enable --now virtlogd

echo 1 | sudo tee /sys/module/kvm/parameters/ignore_msrs

sudo modprobe kvm

#add yourself to groups
sudo usermod -aG docker "${USER}"
sudo usermod -aG libvirt "${USER}"
sudo usermod -aG kvm "${USER}"

reboot

# PulseAudio
docker run \\
    --device /dev/kvm \\
    -e AUDIO_DRIVER=pa,server=unix:/tmp/pulseaudio.socket \\
    -v "/run/user/$(id -u)/pulse/native:/tmp/pulseaudio.socket" \\
    -v /tmp/.X11-unix:/tmp/.X11-unix \\
    sickcodes/docker-osx

# start
 docker start $(docker ps -q --all --filter "ancestor=docker-osx")
```

* <https://github.com/vinnyfs89/Docker-OSX#container-creation-examples>

### References

* <https://github.com/vinnyfs89/Docker-OSX#initial-setup>
* <https://www.youtube.com/watch?v=XMj5FY4NXyI>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://oviniciusfeitosa.gitbook.io/knowledge/technology/operational-systems/docker-+-osx.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
