Sign in

Building a Docker in 5 Minutes

The Easy (Yet Wrong) Way

This article shows how to configure Docker containers the easy (yet probably wrong) way. It is great for beginners to play around with Docker. The only knowledge you need is the Linux command line. No need to learn the Dockerfile script syntax. The Docker we configure is based on Ubuntu, but the technique can be further extended. Finally, we assume that Docker is already installed. If not please refer to

STEP 1/4: Run a Docker Container

$ docker run -it — name 5min ubuntu

This simple command will pop a bash shell from inside the container. Replace the [container_name] by the name of your choosing. In our case we will be using the name “5min” :

$ docker run -it — name 5min ubuntu

STEP 2/4: Configure your Container

For example, to install GNU screen:

$ apt update
$ apt install screen

Note that the “apt update” is important as the system is “new”.

STEP 3/4: Save the Container into an Image

$ docker commit [container_name] [image_name]

[container_name] will be 5min in our example. Let’s set image name to “i5min”:

$ docker commit 5min i5min

STEP 4/4: Run the New Image

$ docker run -it [image_name]

For our example, it will be i5min:

$ docker run -it i5min


Question: what is the difference between the command in STEP 1/4 and STEP 4/4?

Big fan of technology with a recent interest in finance following the rise of cryptocurrencies.