max-mapper / adventure-time

a web based environment for doing nodeschool adventures
97 stars 16 forks source link

Need a way to limit CPU & Memory per container #12

Open cloudgifts opened 6 years ago

cloudgifts commented 6 years ago

When launching a Docker container from the terminal, I can add switches to limit CPU & Memory like this: docker run --cpus=1 --memory=2g -it container

Is there a way to do this with the containers that launch in the browser?

max-mapper commented 6 years ago

We're using the Docker Remote API (npm module is docker-run), I think you can pass options via JSON to the Remote API?