barco is a project I worked on to learn more about Linux containers and the Linux kernel, based on other guides on the internet.
How did you come up with the name "Barco"?
Barco: Linux Containers from Scratch in C
51–60 of 75 posts
Re: Barco: Linux Containers from Scratch in C
#52Re: Barco: Linux Containers from Scratch in C
#53Earlier quoted context omitted.
Looks like a good project to learn container from scratch. Just wondering the main reason you're C since most of the container project now seems to be using Go or Rust?
As the maintainer of a Go container runtime (runc), and having worked with Rust in various other projects, while they can be better languages for building large projects, they make it harder to understand what exactly your program is doing when writing software like this. One example that immediately comes to mind from Rust is a bug with O_PATH file descriptors I found a while ago[1], which would've made certain code…
This issue doesn't intrinsically affect Rust as a language (when compared to C), because you can just do exactly the same thing as you'd have done in C:
let fd = libc::open(b"/path\0".as_ptr().cast(), libc::libc::O_CLOEXEC | libc::O_PATH);
Or just make the syscall directly-ish: let fd = libc::syscall(libc::SYS_open, b"/path\0".as_ptr(), libc::O_CLOEXEC | libc::O_PATH);
Or use rustix if you want more convenient idiomatic wrappers.And for setting up containers you'll have to do this anyway because Rust's standard library doesn't expose all of the necessary functionality anyway.
Re: Barco: Linux Containers from Scratch in C
#54Re: Barco: Linux Containers from Scratch in C
#55Re: Barco: Linux Containers from Scratch in C
#56Earlier quoted context omitted.
I still think it is tangential. The author stated that they wrote this project to learn. The readme says that it is not intended for production use and that there is no networking set up in the containers. With that context, I doubt that name collisions outside of the containers space are top of mind.
If it was my project, I would want to know about a possible name collision. Saying it once seems fine.
Re: Barco: Linux Containers from Scratch in C
#57Re: Barco: Linux Containers from Scratch in C
#58Question: for sandboxing untrusted code, should I invest time in learning more linux container stuff or switch to learning WASI? I am inclined towards WASI myself.
Properly configured WASI runtime are great for security but they're worse than containers on most other fronts. I don't think the downsides make sense unless you're building a business that lets random customers upload WASM files you execute.
Re: Barco: Linux Containers from Scratch in C
#59Earlier quoted context omitted.
How did you come up with the name "Barco"?
docker has to do with ships and barco means ship.
Also I find it interesting that in Portuguese as well as in Spanish the word exists in both genders: el barco, la barca, o barco, a barca.
Re: Barco: Linux Containers from Scratch in C
#60Earlier quoted context omitted.
docker has to do with ships and barco means ship.
It's funny that three people feel the urge to reply for the author and all of them are wrong :-) Also I find it interesting that in Portuguese as well as in Spanish the word exists in both genders: el barco, la barca, o barco, a barca.