How to persist os across restart? #240

Closed
opened 2025-12-29 00:21:24 +01:00 by adam · 4 comments
Owner

Originally created by @shahidcodes 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

Originally created by @shahidcodes 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: ```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 ```
adam closed this issue 2025-12-29 00:21:25 +01:00
Author
Owner

@yozachar 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

@yozachar 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
@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

@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

@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.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Docker-OSX#240