I made a tutorial for docker-stacks

Hey y’all, I made a tutorial on a reproducible jupyter container deployment using docker and the docker-stacks repo. It’s sort of an intro-to-docker-with-jupyter thing.

https://leorobinovitch.com/2019/09/27/jupyter-with-docker.html

Check it out if interested!

Thanks,
Leo

3 Likes

this is great! I’ve been doing something just like this and working on a tutorial myself. I went the Dockerfile route but honestly, I really like your bash-script-on-startup approach.

I now use Docker images to do all my computation. I like applications to be ephemeral. I create containers for single-application purposes and always specify --rm, so a desire was to have them mount $PWD to /work. I ended up going with a bash function that executed “docker run” to mount the current folder at container creation time.

I ended up extending this for everything, like keeping a LaTeX environment in an image that I can spin up with current directory, compile pdf, and dismount+destroy the container. I’m addicted now.

the benefit of having Dockerfiles built is that they can be pulled from the cloud and spun up ready-to-go. my computer has been crashing from sleep/wake lately, so this has been particularly convenient (to not wait for the setup script).

However, I think I’d like to borrow what you did with the setup_envs.sh and use it in place of mounting my setup files from the project folder: https://github.com/mathematicalmichael/docker-env/blob/8e8ea5fb12c04be2e486280768e7b615dc5dacff/docker_run.sh

1 Like

Awesome – glad you found it useful! Sounds like you have definitely found some cool ways to use Docker and put the Dockerfile build method to great use. I think the combination of custom Dockerfiles + startup script will be super powerful.

Is there anywhere I can watch out for the coming tutorial? Please post it here and tag me if you remember!

I have since gone nuts with this and linked a gist on github to handle a ton of “user setup” so that I can minimize rebuilds and keep my base images up to date with my latest preferences (like, fzf functions! bash aliases).

1 Like

Nice, great documentation on the setup.sh here https://gist.github.com/mathematicalmichael/4190e1fae7627a5436d30c24f8dc0e7c#file-setup-sh.

Thanks for sharing!

2 Likes