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

Start it:

docker start julia-container

Check that it's running:

docker ps

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:

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.

Next Post Previous Post