after successful install, when i made some changes inside docker-compose.yml i need to use docker-compose down && docker-compose up to take effect, but it will wipe all my data, and i have to install mac again. can you help me how to preserve volume with data ?
thanks <3
Originally created by @seevik2580 on GitHub (Jun 21, 2020).
hi, i installed mac with `docker-compose.yml`:
```
version: '3.1'
services:
osx:
container_name: "docker-osx"
build:
context: .
args:
- SIZE=200G
- VERSION=10.15.5
image: sickcodes/docker-osx
privileged: true
environment:
- DISPLAY=${DISPLAY:-:0.0}
- RAM=8
- SMP=4
- CORES=4
network_mode: "host"
cap_add:
- ALL
volumes:
- ./tmp/.X11-unix:/tmp/.X11-unix
- /dev:/dev
- /lib/modules:/lib/modules
```
after successful install, when i made some changes inside `docker-compose.yml` i need to use `docker-compose down && docker-compose up` to take effect, but it will wipe all my data, and i have to install mac again. can you help me how to preserve volume with data ?
thanks <3
i don't know how to do it unfortunately, i have just a little experience with git.
feel free to make yours.
@seevik2580 commented on GitHub (Jun 24, 2020):
i don't know how to do it unfortunately, i have just a little experience with git.
feel free to make yours.
here is the template, i made some changes, removing external: true replacing with custom name for docker-compose to auto create volume if not exists yet. because when external: true is present, docker-compose cant create volume, and you have to create it manualy with docker volume create command and when name: is not present, docker-compose create volume with prefix_ of service name so need to use version 3.4 instead of 3.1 because custom names for volumes was added in 3.4
@seevik2580 commented on GitHub (Jun 24, 2020):
here is the template, i made some changes, removing `external: true` replacing with custom `name` for docker-compose to auto create volume if not exists yet. because when `external: true` is present, docker-compose cant create volume, and you have to create it manualy with `docker volume create` command and when `name:` is not present, docker-compose create volume with prefix_ of service name so need to use version 3.4 instead of 3.1 because custom names for volumes was added in 3.4
```
version: '3.4'
services:
osx:
container_name: docker-osx
build:
context: .
args:
- SIZE=200G
- VERSION=10.15.5
image: sickcodes/docker-osx
privileged: true
environment:
- DISPLAY=${DISPLAY:-:0.0}
network_mode: "host"
cap_add:
- ALL
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix
- /dev:/dev
- /lib/modules:/lib/modules
- docker-osx_data:/home
volumes:
docker-osx_data:
name: docker-osx_data
```
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @seevik2580 on GitHub (Jun 21, 2020).
hi, i installed mac with
docker-compose.yml:after successful install, when i made some changes inside
docker-compose.ymli need to usedocker-compose down && docker-compose upto take effect, but it will wipe all my data, and i have to install mac again. can you help me how to preserve volume with data ?thanks <3
@seevik2580 commented on GitHub (Jun 22, 2020):
i think i figured out with creating new volume
docker volume create docker-osx_datathen make some changes inside
docker-compose.ymland now i can safely use
docker-compose down:)@sickcodes commented on GitHub (Jun 23, 2020):
Awesome work! Want to submit a PR?
@seevik2580 commented on GitHub (Jun 24, 2020):
i don't know how to do it unfortunately, i have just a little experience with git.
feel free to make yours.
@seevik2580 commented on GitHub (Jun 24, 2020):
here is the template, i made some changes, removing
external: truereplacing with customnamefor docker-compose to auto create volume if not exists yet. because whenexternal: trueis present, docker-compose cant create volume, and you have to create it manualy withdocker volume createcommand and whenname:is not present, docker-compose create volume with prefix_ of service name so need to use version 3.4 instead of 3.1 because custom names for volumes was added in 3.4@Julioevm commented on GitHub (Jul 2, 2020):
I've made the PR:
https://github.com/sickcodes/Docker-OSX/pull/57
@seevik2580 commented on GitHub (Jul 2, 2020):
thank you <3 i need to learn how to do it in future
@sickcodes commented on GitHub (Jul 2, 2020):
❤️❤️❤️❤️ I’ll merge when I’m back at the PC @Julioevm ✅