Rocking with Docker

Introduction

  • Who am I?
  • What's docker?
  • What's docker used for?
  • Basic Concepts
  • How to manage it?
  • How to develop my docker skills?
  • References

Who am I?

* Rondineli Gomes

  1. The ugly guy who's speaking
  2. Working at Fender/Riffstation
  3. No, I don't play any instrument
  4. SysAdmin, Devops, Monitoring
  5. Working with Docker ~3 years
  6. I've Never used Docker with Windows

What's Docker then?

Docker is a program that virtualizes in a level of operating-system, it is also known as a containers. It was released in 2013 by Docker Inc. Mainly used to run and delivery packages  in "containers".

In summary it has been the most devops tool to create agile, hybrid and or microservices infrastructure

What's Docker then?

Difference between Containers and Virtual machines?

What's Docker then?

Difference between Containers and Virtual machines

  1. Docker engine takes care of share the libraries and resources on host OS while VM creates it's own library and a "new operational system"
  2. Docker engine had lxc and then replaced to runc (known as at libcontainer) this allows it to share a lot of the host operating system resources
  3. Docker is using Aufs, which is a layered filesystem which allows docker managing better the Os Filesystem.

What's Docker then?

Under the hood

 What's docker used for?

  • Microservices
  • Hybrid Cloud
  • CI/CD
  • Configuration Management
  • Servless workflows
  • Development environments

 What's docker used for?

Docker Compose is basically a docker tool that allows you to create easily integration between containers, allows create hybrid networks and allows each app connect with each other trough a private network and or with the host OS.

Extra: What's docker-compose?

Basic Concepts!

DockerFile

Image

Container

DockerHub
Registry

Basic Concepts!

DockerFile

FROM alpine:latest
MAINTAINER Rondineli Gomes <rondineli.gomes.araujo@gmail.com>
ADD . /app

RUN apk add --no-cache python3 && \
    python3 -m ensurepip && \
    rm -r /usr/lib/python*/ensurepip && \
    pip3 install --upgrade pip setuptools && \
    if [ ! -e /usr/bin/pip ]; then \
    ln -s pip3 /usr/bin/pip ; fi && \
    if [[ ! -e /usr/bin/python ]]; then \
    ln -sf /usr/bin/python3 /usr/bin/python; fi && \
    rm -r /root/.cache

RUN apk add --no-cache curl git vim && pip3 install flask

ENV FLASK_APP=/app/app.py

EXPOSE 5001

CMD ["flask", "run", "-h", "0.0.0.0", "-p", "5001"]
FROM
MAINTAINER
RUN
CMD
ENV
EXPOSE
ADD
COPY

Basic Concepts!

Solid state of the image. During the build it will run every step defined on Dockerfile and then store it as a layer that will be used afterwards.

DockerFile

Image

Basic Concepts!

DockerHub
Registry

DockerFile

Image

Repository that can saved the images and created versions of the build at every change made on the code or on the image itself.

It can be private, or public in dockerhub: https://hub.docker.com/

Basic Concepts!

DockerFile

Image

Container

DockerHub
Registry

Container is the final result of the image. It can be downloaded by any hub or by local image.

How to manage it?

How to develop my docker skills?

https://github.com/Rondineli/eks-terraform-lab

https://www.youtube.com/user/linuxtipscanal

References

  • https://stackoverflow.com/questions/16047306/how-is-docker-different-from-a-virtual-machine
  • https://docs.docker.com/engine/
  • https://hub.docker.com/
  • https://www.docker.com/what-docker

Thank you all!!

  • https://github.com/Rondineli
  • https://www.linkedin.com/in/rondineliaraujo/
  • https://www.facebook.com/profile.php?id=100010653730688

QUESTIONS????

Rocking with Docker

By Rondineli Gomes