Key links

Uncategorized Links

Tutorials

See my own project with set up intructions, commands to run and sample projects.

Learn Docker

Learn the shell approach

A quick way to get started with a container is to choose one specific to an OS, download the image and create and run a container for it - all from the shell.

In this simple case, there is no app to run and there are no custom dependencies. You can do what you like in the container to install and run things and start over if you don’t like it. Once you have a simple image built, you can jump to the interactive console to run commands in it.

If you start off by using a Dockerfile, you’re going to be rerunning the entire Dockerfile a few times to fine-tune commands or fix syntax errors. So a good flow is to experiment interactively and then when things work you can move commands to the Dockerfile and then build you custom image and not just the generic one.

Learn the Dockerfile approach

It is a good idea to start with handling a container using the commands here without worrying about creating any files yet. Then later you can move to the file-based approach, where commands you run by hand in the shell are now in a recipe which can be reproduced easily by you or someone else - anyone with the Dockerfile.

This recipe is stored in a Dockerfile - useful for if you have a few or many image build steps such as setting up an app and its dependencies.

Install

See Install in my Dev Cheatsheets.