[GH-ISSUE #332] How to persist os across restart? #238

Closed
opened 2026-02-27 22:08:40 +03:00 by kerem · 4 comments
Owner

Originally created by @shahidcodes on GitHub (Aug 25, 2021).
Original GitHub issue: https://github.com/sickcodes/Docker-OSX/issues/332

for both naked and auto images how do I persist installation of the os across restart?

My goal is to use this image to debug my websites on safari and do some development but I noticed there is no bind mount or whatsoever in both naked and auto images.

I am same commands as given in example -
i.e.

for naked:

docker run -it \
    --device /dev/kvm \
    -p 50922:10022 \
    -v "${PWD}/mac_hdd_ng_auto.img:/image" \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    -e "DISPLAY=${DISPLAY:-:0.0}" \
    sickcodes/docker-osx:naked

for auto:

docker run -it \
    --device /dev/kvm \
    -p 50922:10022 \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    -e "DISPLAY=${DISPLAY:-:0.0}" \
    -e "OSX_COMMANDS=/bin/bash -c \"pwd && uname -a\"" \
    sickcodes/docker-osx:auto

Originally created by @shahidcodes on GitHub (Aug 25, 2021). Original GitHub issue: https://github.com/sickcodes/Docker-OSX/issues/332 for both naked and auto images how do I persist installation of the os across restart? My goal is to use this image to debug my websites on safari and do some development but I noticed there is no bind mount or whatsoever in both `naked` and `auto` images. I am same commands as given in example - i.e. for naked: ```bash docker run -it \ --device /dev/kvm \ -p 50922:10022 \ -v "${PWD}/mac_hdd_ng_auto.img:/image" \ -v /tmp/.X11-unix:/tmp/.X11-unix \ -e "DISPLAY=${DISPLAY:-:0.0}" \ sickcodes/docker-osx:naked ``` for auto: ```bash docker run -it \ --device /dev/kvm \ -p 50922:10022 \ -v /tmp/.X11-unix:/tmp/.X11-unix \ -e "DISPLAY=${DISPLAY:-:0.0}" \ -e "OSX_COMMANDS=/bin/bash -c \"pwd && uname -a\"" \ sickcodes/docker-osx:auto ```
kerem closed this issue 2026-02-27 22:08:40 +03:00
Author
Owner

@nandgator commented on GitHub (Aug 25, 2021):

H 👋🏻, I'm a mac newbie (installation seems daunting ). Got the same issue here, the partition disappears after re-running docker run -it --device /dev/kvm -p 50922:10022 -v /tmp/.X11-unix:/tmp/.X11-unix -e "DISPLAY=${DISPLAY:-:0.0}" sickcodes/docker-osx:big-sur

<!-- gh-comment-id:905762710 --> @nandgator commented on GitHub (Aug 25, 2021): H 👋🏻, I'm a mac newbie (installation seems daunting ). Got the same issue here, the partition disappears after re-running `docker run -it --device /dev/kvm -p 50922:10022 -v /tmp/.X11-unix:/tmp/.X11-unix -e "DISPLAY=${DISPLAY:-:0.0}" sickcodes/docker-osx:big-sur`
Author
Owner
<!-- gh-comment-id:905778514 --> @sickcodes commented on GitHub (Aug 25, 2021): https://github.com/sickcodes/Docker-OSX#start-the-same-container-later-persistent-disk
Author
Owner

@sickcodes commented on GitHub (Aug 25, 2021):

for both naked and auto images how do I persist installation of the os across restart?

My goal is to use this image to debug my websites on safari and do some development but I noticed there is no bind mount or whatsoever in both naked and auto images.

I am same commands as given in example -
i.e.

for naked:

docker run -it \
    --device /dev/kvm \
    -p 50922:10022 \
    -v "${PWD}/mac_hdd_ng_auto.img:/image" \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    -e "DISPLAY=${DISPLAY:-:0.0}" \
    sickcodes/docker-osx:naked

for auto:

docker run -it \
    --device /dev/kvm \
    -p 50922:10022 \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    -e "DISPLAY=${DISPLAY:-:0.0}" \
    -e "OSX_COMMANDS=/bin/bash -c \"pwd && uname -a\"" \
    sickcodes/docker-osx:auto

Yeah I am thinking of adding a naked auto

<!-- gh-comment-id:905778735 --> @sickcodes commented on GitHub (Aug 25, 2021): > for both naked and auto images how do I persist installation of the os across restart? > > My goal is to use this image to debug my websites on safari and do some development but I noticed there is no bind mount or whatsoever in both `naked` and `auto` images. > > I am same commands as given in example - > i.e. > > for naked: > > ```shell > docker run -it \ > --device /dev/kvm \ > -p 50922:10022 \ > -v "${PWD}/mac_hdd_ng_auto.img:/image" \ > -v /tmp/.X11-unix:/tmp/.X11-unix \ > -e "DISPLAY=${DISPLAY:-:0.0}" \ > sickcodes/docker-osx:naked > ``` > > for auto: > > ```shell > docker run -it \ > --device /dev/kvm \ > -p 50922:10022 \ > -v /tmp/.X11-unix:/tmp/.X11-unix \ > -e "DISPLAY=${DISPLAY:-:0.0}" \ > -e "OSX_COMMANDS=/bin/bash -c \"pwd && uname -a\"" \ > sickcodes/docker-osx:auto > ``` Yeah I am thinking of adding a naked auto
Author
Owner

@sickcodes commented on GitHub (Aug 25, 2021):

docker build -t naked-auto --build-arg COMPLETE= -f Dockerfile.auto .

Will build a naked auto

<!-- gh-comment-id:905779723 --> @sickcodes commented on GitHub (Aug 25, 2021): `docker build -t naked-auto --build-arg COMPLETE= -f Dockerfile.auto .` Will build a naked auto
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Docker-OSX#238
No description provided.