I teach a community college course on linux system administration. Some students in the class do not have ready access to a linux install so the college has an SSH server they can access to complete lab work, experiment etc. Naturally, we don't provide the students with root access etc which has obvious pedagogical limitations.
I've been mulling around in my mind an idea where by the students can have their own container where they can have root privileges to etc so that I can cover a wider range of topics. I experience with containers is somewhat limited so I have a few questions that I was hoping to get some help with:
- Is it possible to have the students ssh "directly" to the container or would they have to start the container on login. Note, I'm not asking about (e.g.) binding the container to a specific port but is it possible to have their (/etc/passwd) shell be the container's shell or otherwise drop them into the container directly after login through a bash setting?
- Most of the time containers are run ephemerally but I essentially want to have the students to be able to have a persistent container. Are there any potential problems with having persistent containers?
- I feel like having a student be in a container would be more secure than them having unprivileged shell access, but are there any security disadvantages of giving students root access to a container?
Students have used a Centos system for their work previously and all my course material is built around Centos. Is there a suggested container image I should use? Would the regular docker/podman centos image work ok for this situation.
Thank you for your help and suggestions.