Share your repls and programming experiences

← Back to all posts
Chroot Linux
h
programmeruser (615)

Basically a chrooted Alpine Linux system that streams stdout/stderr/stdin through a websocket
Another version I created can be found here but it's currently not working due to some library problems
TODO: make the prompt $ work and attach a pty instead of streaming stdout/stderr/stdin, migrate the proot installation to nix

Comments
hotnewtop
MarcusWeinberger (796)

I found one issue, programs requiring access to /dev don't work, you should bind replit's /dev to the prooted /dev (use -b /dev:/sessions/${id}/dev)

MarcusWeinberger (796)

@programmeruser what did you try doing? it worked for me, i modified your repl a little to remove the web aspect: https://replit.com/@MarcusWeinberger/alpine

programmeruser (615)

@MarcusWeinberger oops, I used -b /dev:/sessions/${id}/dev instead of -b /dev:/dev

programmeruser (615)

@MarcusWeinberger it works, that is, unless you don't want people printing messages to the console...

MarcusWeinberger (796)

@programmeruser whoops, that was my bad actually, I messed up the command syntax when I recommended it to you

CSharpIsGud (1070)

Now this is cool, might try to do something neat with this later

programmeruser (615)

@CSharpIsGud what exactly are you planning to do?

CSharpIsGud (1070)

@programmeruser idk I was thinking of getting a package manager running on it, but nix exists so now I don't know of many real reasons to do it.
Besides sandboxing there aren't really many very good uses of chroot.

programmeruser (615)

@CSharpIsGud apk is already available because it's Alpine Linux

wispkoe (1)

This is a work of art

Whippingdot (678)

So I am going to be the first to make a comment out of the normal - I think I have seen this on your about page...have I? If not - what is this? Like a terminal or...I haven't really learned what a chrooted Alpine Linux system is yet.