I’m hosting a small jupyterhub instance on a single node, which uses a DockerSpawner for single user containers, and also gives users sudo. Our image is based on jupyter/docker-stacks. I would like to know if it’s possible for users to view their server logs. The documentation mentions getting server logs via docker logs user-container, but that is obviously not an option for a regular user.
I have tried tail -f /proc/<server_pid>/fd/1, but I’ve gotten a permission denied even though it should be the same user.
The easiest way is probably to build your image with a custom entrypoint that runs Jupyter but duplicates stdout/stderr to also go to a log file inside the container that the user can read.