Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

Is it possible to increase ram after creating the container?

You must be logged in to vote

Replies: 6 comments · 9 replies

Comment options

I got here with the same problem. I have 32GB to use and the container only senses 2GB.

You must be logged in to vote
0 replies
Comment options

I'll write a script later today

You must be logged in to vote
2 replies
@sickcodes
Comment options

The easiest way would be docker start -ai yourcontainer

docker exec -it containerid /bin/bash

vi Launch.sh

And add RAM=16 for 16GB of ram at the top of the script

@sickcodes
Comment options

The correct solution is: https://github.com/sickcodes/Docker-OSX#quick-start-own-image-naked-container-image

Comment options

docker update --memory=16g container-name

You must be logged in to vote
0 replies
Comment options

docker update --memory=16g container-name

Woah didn't even know you could do Docker update!

You must be logged in to vote
1 reply
@avijoni
Comment options

Btw, don't forget to expand swap space. I had issue adding more ram, without adding more swap space. Swap should be at least the size of memory. Hope this helps.

docker update --memory=4g --memory-swap=4g container-name

you can put --memory-swap=-1 for unlimited

Cheers.

Comment options

im tryng to change ram memory but no luck
i changed the launch.sh and the docker ram, but macos does not recognize more than 4gb of ram (my windows pc is 32gb and wsl gives full access to windows ram, does not limit)
can you help me where exactly i change to recognize more ram in macos?
more info: im running docker-osx:ventura
I would like to use macos ventura to study development on xcode

You must be logged in to vote
2 replies
@MitjaHenner
Comment options

Having the same problem.
EDIT:
Recreated the container with RAM=16

@artschur
Comment options

Having the same problem.

EDIT:

Recreated the container with RAM=16

How were you able to change the ram on it??

Comment options

I had the most success following this:

The easiest way would be docker start -ai yourcontainer

docker exec -it containerid /bin/bash

vi Launch.sh

And add RAM=16 for 16GB of ram at the top of the script

When adding more cpu I had to add the following to lines in the beginning of Launch.sh like this:

CORES=8
SMP=8

Just adding CORES does not work and the container exits immediately after starting.

You must be logged in to vote
4 replies
@mateusdata
Comment options

Realmente tive sucesso aqui. muito obrigada. Depois de 3 dias tentando consequi agora.

I really had success here. thank you very much. After 3 days of trying I got it now.

@antoniovini47
Comment options

image

Thanks, that worked! Just need to restart the container after that.

@mateusdata
Comment options

Perfeito.

@dannypurcell
Comment options

Brilliant, Thanks!

Confirming this works, just went through the following:

  • Set up a Sonoma image according to the README
  • Run docker update --memory=4g --memory-swap=4g <container-name>
  • docker exec -it <container-name> /bin/bash
  • Make the top of file edits as shown in the screenshot here, save and exit vi
  • Shutdown from OSX Apple menu
  • docker restart <container-name>

Now able to run XCode Simulator to run on a Sonoma 14.7.2 image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
Morty Proxy This is a proxified and sanitized view of the page, visit original site.