Originally created by @jaovito on GitHub (May 26, 2021).
I upgraded my RAM PC and I want OSX on the docker to use more RAM, too, but I don't want to have to reinstall it again. I use linux (ubuntu).
Originally created by @jaovito on GitHub (May 26, 2021).
I upgraded my RAM PC and I want OSX on the docker to use more RAM, too, but I don't want to have to reinstall it again. I use linux (ubuntu).
pass it into a new container created with image docker.io/sickcodes/docker-osx:naked & -v path/to/the/copied/image:/image
use -e RAM=16 to set the desired cap
@coppercash commented on GitHub (May 26, 2021):
It's in the doc and previous issues.
1. extract the image with `docker cp`
2. pass it into a new container created with image `docker.io/sickcodes/docker-osx:naked` & `-v path/to/the/copied/image:/image`
3. use `-e RAM=16` to set the desired cap
No need to do all that stuff. Here is a much simpler solution that I saw nowhere posted.
The following is useful if you want to change the resolution, RAM, nopicker, headless, and all other options of an existing container, without copying images / creating new containers:
1. Stop docker
sudo systemctl stop docker
2. Install a simple lib that formats JSON files (for easier editing)
sudo apt-get -y install jq
3. Take the configuration of you current container, format it, and put it back
@christosnc commented on GitHub (Jun 11, 2021):
No need to do all that stuff. Here is a much simpler solution that I saw nowhere posted.
The following is useful if you want to change the resolution, RAM, nopicker, headless, and all other options of an existing container, without copying images / creating new containers:
**1. Stop docker**
```bash
sudo systemctl stop docker
```
**2. Install a simple lib that formats JSON files (for easier editing)**
```bash
sudo apt-get -y install jq
```
**3. Take the configuration of you current container, format it, and put it back**
```bash
sudo jq . /var/lib/docker/containers/<CONTAINER-FULL-ID>/config.v2.json > ~/config.v2.json
sudo mv ~/config.v2.json /var/lib/docker/containers/<CONTAINER-FULL-ID>/config.v2.json
```
**4. Change anything you want (usually under Env:)**
```bash
nano /var/lib/docker/containers/<CONTAINER-FULL-ID>/config.v2.json
```
**5. Restart docker**
```bash
sudo systemctl restart docker
```
##
To find the \<CONTAINER-FULL-ID\> run `sudo ls /var/lib/docker/containers/` or `docker inspect <container-short-id>`
##
### Notes (the following apply on step 4 above)
* **Change resolution**
Set Env -> "WIDTH=\<your-number\>"
Set Env -> "HEIGHT=\<your-number\>"
* **Make headless**
Set Env -> "EXTRA=-display none"
(You need to set-up an access method like SSH before)
* **Change RAM**
Set Env -> "RAM=\<your-number\>"
* **Disable boot screen (disk selector) to boot directly in your installation**
Set Env -> "MASTER_PLIST_URL=https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-nopicker-custom.plist"
I think the jq solution is perfecto and I would like to add it to the Documentation, did you want to PR that comment @christosnc?
@sickcodes commented on GitHub (Jun 15, 2021):
Thanks @coppercash & @christosnc!
I think the jq solution is perfecto and I would like to add it to the Documentation, did you want to PR that comment @christosnc?
This issue can be closed, but I could make a PR to expand on it:
If you want to add a port mapping, I think you also need to edit the file hostconfig.json (I haven't tested yet)
I'm assuming some ENV vars are only read when the vm is created and cannot be modified later. It could be nice to list which ones are eligible for modification.
@gronka commented on GitHub (Dec 7, 2021):
This issue can be closed, but I could make a PR to expand on it:
1. If you want to add a port mapping, I think you also need to edit the file hostconfig.json (I haven't tested yet)
2. I'm assuming some ENV vars are only read when the vm is created and cannot be modified later. It could be nice to list which ones are eligible for modification.
@christosnc @sickcodes it is a good solution. i think it is a very good thing to add all possible post configurations into a seperate section in the readme, i.e i am trying to mount a shared volume which again asks me to install from scratch but i am sure it would be possible from this config therefore if we can have a section in the readme with all post installation customizations, it would be great!
@Samadmehmood commented on GitHub (Mar 6, 2024):
@christosnc @sickcodes it is a good solution. i think it is a very good thing to add all possible post configurations into a seperate section in the readme, i.e i am trying to mount a shared volume which again asks me to install from scratch but i am sure it would be possible from this config therefore if we can have a section in the readme with all post installation customizations, it would be great!
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 @jaovito on GitHub (May 26, 2021).
I upgraded my RAM PC and I want OSX on the docker to use more RAM, too, but I don't want to have to reinstall it again. I use linux (ubuntu).
@coppercash commented on GitHub (May 26, 2021):
It's in the doc and previous issues.
docker cpdocker.io/sickcodes/docker-osx:naked&-v path/to/the/copied/image:/image-e RAM=16to set the desired cap@jaovito commented on GitHub (May 27, 2021):
Thanks man, I will try this
@mchemweno commented on GitHub (Jun 11, 2021):
Did it work??
@christosnc commented on GitHub (Jun 11, 2021):
No need to do all that stuff. Here is a much simpler solution that I saw nowhere posted.
The following is useful if you want to change the resolution, RAM, nopicker, headless, and all other options of an existing container, without copying images / creating new containers:
1. Stop docker
2. Install a simple lib that formats JSON files (for easier editing)
3. Take the configuration of you current container, format it, and put it back
4. Change anything you want (usually under Env:)
5. Restart docker
To find the <CONTAINER-FULL-ID> run
sudo ls /var/lib/docker/containers/ordocker inspect <container-short-id>Notes (the following apply on step 4 above)
Change resolution
Set Env -> "WIDTH=<your-number>"
Set Env -> "HEIGHT=<your-number>"
Make headless
Set Env -> "EXTRA=-display none"
(You need to set-up an access method like SSH before)
Change RAM
Set Env -> "RAM=<your-number>"
Disable boot screen (disk selector) to boot directly in your installation
Set Env -> "MASTER_PLIST_URL=https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-nopicker-custom.plist"
@mchemweno commented on GitHub (Jun 15, 2021):
Very awesome solution!! Thanks!
@sickcodes commented on GitHub (Jun 15, 2021):
Thanks @coppercash & @christosnc!
I think the jq solution is perfecto and I would like to add it to the Documentation, did you want to PR that comment @christosnc?
@christosnc commented on GitHub (Jun 19, 2021):
Thanks, sure! I'll make a PR.
@gronka commented on GitHub (Dec 7, 2021):
This issue can be closed, but I could make a PR to expand on it:
@Samadmehmood commented on GitHub (Mar 6, 2024):
@christosnc @sickcodes it is a good solution. i think it is a very good thing to add all possible post configurations into a seperate section in the readme, i.e i am trying to mount a shared volume which again asks me to install from scratch but i am sure it would be possible from this config therefore if we can have a section in the readme with all post installation customizations, it would be great!
@kotoSky commented on GitHub (Apr 10, 2024):
Why don't I have this file /config.v2.json