Is there a Linux technology that looks like this?
Posted by MarsupialLeast145@reddit | learnprogramming | View on Reddit | 25 comments
I am a developer who writes a lot of 101s. I am looking to expand to write a more complex piece of software and turn it into a tutorial.
While I am pretty confident I won't mess things up locally, AND I could also get a disposable VM... I want people who read my guide/tutorial to be able to access my lessons easily without too much concern.
Is there a Linux technology that is light-weight and I can set up within an hour that:
- Gives me a process isolated shell.
- Acts like a virtual environment that allows me to install binaries.
- Allows me to access existing binaries, e.g. cli tools/compilers.
- Provides isolated disk space.
- Enables me to still use my local ports, e.g. for running simple web servers.
- Ideally I can turn it "on" or "off" when I don't need it any more, e.g. a learner can quit and their progress remains in this isolated sandbox.
I think that's all my primary requirements I can pinpoint right now.
Any ideas appreciated! (thank you in advance fellow tutors/learners!)
razorree@reddit
something like Distrobox? (there are few similar container based solutions)
MarsupialLeast145@reddit (OP)
Just playing around with distrobox now and I think it may be the one for now. There are some good blogs about providing better isolation, and I think for my users I will ask them to create a new user on their Linux system which isn't bad hygiene anyway.
syklemil@reddit
Sounds mostly like containers to me. Have you looked into tools like
podman(ordocker)?MarsupialLeast145@reddit (OP)
I know Docker but my early interactions with it made it seem like it wasn't designed to give me a shell and installing dependencies was a much more rigid affair where I really would like learners to be able to engage with both the shell and the file system.
Does Podman do that? or is Docker also able to provide that?
grantrules@reddit
It's super easy to get into a shell.. just use a base image like debian then run
docker run -it bashand there's your shell and you can install stuff with apt.Marbletm@reddit
This might be interesting to you:
https://code.visualstudio.com/docs/devcontainers/containers
You can define a dev container through a json file and vscode will create a development container based off of that. So once you've defined everything it's easy to share your setup.
It works off of Docker, so you do need a basic understanding of it to set things up as the course designer. But it should be really easy to get running as a learner.
syklemil@reddit
Both of them can do that. If you want to run a short-lived ubuntu install, you can
podman run --rm -it ubuntu(ors/podman/docker/).For your usecase it seems like you'll want to set up some Containerfile and build an image that your learners will use, and likely also some compose file for stuff like running with certain ports and volume mounts.
MarsupialLeast145@reddit (OP)
I'll follow the Podman thread a little more -- any sort of simplification over Docker would help.
Any does Podman have compose like capability?
syklemil@reddit
Yeah, from the head of
podman compose --help:Fit-Original1314@reddit
Yep, containers are basically built for this
Hybrii-D@reddit
Proxmox or Qubes OS maybe could do that.
Key_Use_8361@reddit
half of learning linux is figuring out what the tools are even called
MarsupialLeast145@reddit (OP)
Lol true. If it seems my description is ambiguous it is because I have my own biases I don't want to repeat here where my searches are failing. If there's something else out there that isn't, say, docker, which comes up in 90% of my results then I am hoping to find those. I'm looking at distrobox on a suggestion below now and I didn't find it at all previously.
Lessons will likely be for golang/python/backend and a bit of Linux 🙂
NationalOperations@reddit
Are people accessing your container? The reason you need one for other people to see your tutorials went over my head
MarsupialLeast145@reddit (OP)
I was avoiding the word container. Think of the need as:
NationalOperations@reddit
Right, but are they setting these up or are you setting them up and giving them some kind of access?
MarsupialLeast145@reddit (OP)
I want them to set one up at the beginning of the process and then for us to build iteratively inside something like that as we progress through the lessons.
NationalOperations@reddit
Gotcha, that makes sense.
NEGMatiCO@reddit
Distrobox with a custom home directory. I use this setup regularly for all my development tasks.
MarsupialLeast145@reddit (OP)
Another new one to me, but thank you! I will check it out! 🙏
desrtfx@reddit
Either containerization or Virtual Machine - VirtualBox and VMWare Workstation Pro (my preferred) are free.
MarsupialLeast145@reddit (OP)
I only got introduced to VM on Windows, but haven't circled back on Linux. Will take a look!
roanish@reddit
Sounds like proxmox style containers maybe?
MarsupialLeast145@reddit (OP)
New to me but I'll take a look! 🙏
igotshadowbaned@reddit
Sounds like a docker container