My configuration:
- Laptop with VSCode (with VSCode remote development extension) & Docker Desktop.
- Server with Docker Host.
- My project locally just have: devcomposer.json, and a docker-compose.json.
My process:
- Open SSH tunnel to server.
- In VSCode I hit open in container (which builds the container).
- My remote development container builds fine, and I'm able to use everything there.
My little PROBLEM:
When running a simple chown over hugely populated folders, such as node_modules, the container memory requirements go mad, crashing not just the container, but my whole server....
I've tried:
Setting runArgs with:
- ["-m","3g"]
- ["--memory=3g"]
- ["--memory=\"3g\""]
- ["--memory-reservation=3g"]
Setting a ulimit in my Dockerfile, for the user that later runs the chown command.
Deleting all images and containers in Docker host, to force --no-cache (which I haven't found how to inject it neither :-/ )
HELP! Nothing works... Someone has any clue as to what could I do to prevent the container to consume all the memory from the server?
Repo with config: https://github.com/gsusI/vscode-remote_dev-config_test