morganllewellynjones / container_project

An attempt to create a container runtime similar to Docker run, but in Rust.
0 stars 1 forks source link

Unshare and Fork a process in rust to create a child process that inhabits a new namespace #1

Closed morganllewellynjones closed 3 months ago

morganllewellynjones commented 5 months ago

Before customizing the namespaces of the child process, we should gate all of them by default.

morganllewellynjones commented 3 months ago

Turns out the rust std::Process library has convenient methods for creating new processes, which calls fork under the hood. The whole chain can be pretty cleanly connected to the unshare command.