Docker – Commonly Used Commands

To build an image (use -t to specify name:tag):Run: docker build -t NAME /path/to/Dockerfile To run an image (use —name to define name for the container):Run: docker run -d —name ContainerNAME ImageNAME** -d means detached modeOr Run: docker run -dit …** -t means allocate a pseudo-TTY which can keep the container running if no other commands are provided.** -i,Continue reading “Docker – Commonly Used Commands”

Docker 101 – Bind mounts or Volumes

This article is written for docker beginners to understand bind mounts and volumes and how to choose between them. Bind mounts A file or directory on the host machine is mounted into a container, it is created on demand if it does not yet exist If you bind-mount to a non-empty directory in the container, that directory’sContinue reading “Docker 101 – Bind mounts or Volumes”

Get an empty Ubuntu docker image up and running with a sudo-enabled user

I’m still a beginner in Docker and still don’t have a clue what most of the instructions in Dockerfile or docker-compose.yml do. I just understand the simple ones. So to consolidate my understandings and also shed light for others, I decided to just make a very simple Dockerfile for you, presumably also a beginner toContinue reading “Get an empty Ubuntu docker image up and running with a sudo-enabled user”