I actually secretly hate Docker because it keeps popping up in my life and I still don't quite get it. Eventually I will, but for now here's a quick start guide (mostly for myself) to test stuff out with Julia in a Docker image.
To install Docker on Ubuntu, see here. See also troubleshooting at the bottom of the page.
To create a new interactive docker container:
docker create -it --name julia-container julia:1.6.2
docker start julia-container
Check that it's running:
Attach a shell to it:
docker exec -it julia-container bash
To leave just
Ctrl + D. You may also have to stop and remove it eventually:
docker stop julia-container docker rm julia-container
You may also run into the following problems:
- Issues when first trying to run docker - restart your computer.
- Permission denied when running docker command
I use this mainly for testing to see what will work on my continuous integration stuff on GitLab (plotting seems to break everything, and debugging by pushing and waiting for the image to load is not ideal), so for now this is enough. Eventually though I guess I would like to know how to get files into the docker image.