jmaquin0 / DOCKER_WORKSHOP

A docker and microservices tutorial

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docker and microservices workshop

What is Docker?

Docker is a platform for developers and sysadmins to build, run, and share applications with containers. The use of containers to deploy applications is called containerization. Containers are not new, but their use for easily deploying applications is. Source:Docker Docs.

What is a container?

Fundamentally, a container is nothing but a running process, with some added encapsulation features applied to it in order to keep it isolated from the host and from other containers. Docker arrchitecture

Installation

First of all you need to install Docker, the steps will depend on your OS:

Windows

note: You need Windows 10 Pro, Enterprise or Education (tip: if you have an educational email email, you are elegible to have a Windows 10 Education license)

update: Windows 10 home is now supported but you need to update to 2004 release an enable wsl2.

  • In my opinion, the easiest way to install doccker in windows is using chocolatey

  • The second method to install directly from Dockerhub

  • A third alternative is to install a linux virtual machine (any distro) and install docker on it.

Mac OS

Linux

The installation on Linux has variations according to the distribution, there is an installation page with instructions for the more pupular distributions.

After the installations you should run some configuration steps to secure your docker execution

Testing the installation

A successfull docker installation can be tested in two ways:

  1. On a terminal execute docker -v or docker --version you should get an output like:

output version

  1. On a terminal execute: docker run hello-world you should get an output like:

output hello-world

Using an interactive container

Now let's use an interactive nodeJs container, for this we will use the command: docker run -it node. There is an example of couple of code lines.

output interactive node

About

A docker and microservices tutorial