Thursday, March 13, 2025

Docker - beginings



Who knew, that idea of 3 gentelmens during summer 2010 invent something that will have change the world. It take 21 months of development to go public on conference PyCon in Santa Clarita, but now, it is core of microservices. Docker is core element in Cloud. 

Best was of learining, is by doing (practice). Let's start of learning...

Step 1. Install Docker

For docker presentation, I created VM with Ubuntu24.04.2 LTS in VMware Player.



To confirm, that Docker is not present, snapshoot for the record.


All commands are from official Docker website.

In first step I added GPG keys and repository to apt sources:


# Add Docker's official GPG key:

sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:

echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update



In next step Docker is installed.

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

After instalation, I verified if docker is installed.

docker --verison



Summary:

Docker is software to create separated enviroment from opertation system.

Docker file is a text file having instructions and commands necesary to build docker image.

Docker image it is template , which is used to build containers. It can be stored local or remote.

Docker container is lightweight enviroment which contains, application  and necesarry libraries, builded from docker image.

Docker Hub it is online repetytory for storage of Docker images.

Docker Desktop is Docker software with grafical UI.

Docker compose create docker containers form sigle docker file. Docker compose text file contains instruction, commands and relations between future containers.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Docu:

1: https://docs.docker.com/engine/install/ubuntu/

2: https://supportfly.io/docker-swarm-vs-docker-compose/







No comments:

Post a Comment

K8s cluster - bash install

     In my homelab, I testes another method of installation of Kubernetes. Average time of installation of Kubernetes via Ansible was 15 min...