A repository containing a short tutorial for Docker (with Python).

Overview

Docker Tutorial for IFT 6758 Lab

image

In this repository, we examine the advtanges of virtualization, what Docker is and how we can deploy simple programs on Docker.

Firstly, we will start by listing some advantages of virtualization. We can discuss them as follows:

  • Minimize hardware costs (Multiple virtual servers on one hardware unit).
  • Easily for HA (High Availability) And Disaster Recovery (DR).
  • Easier to save money and save energy, could be potentially greener.

Problems with Virtualization:

  • Hard to maintain each OS, installation, HyperVisor and host OS compatibility issues, and HyperVisor - container issues.
  • Costly and might take IT/Programming effort.
  • We might need a high storage overhead, even lightweight OSs with all tools installed can bulk up to a high size.

image

Solution?

  • Use containers!

Container definition:

  • is a runnable instance (or sandbox) of an image.
  • can be run on local machines, virtual machines or deployed to the cloud.
  • is portable (can be run on any OS).
  • Containers are isolated from each other and run their own software, binaries, and configurations.

Methodology:

  • These applications share a parent application and its overhead.
  • These apps can run separately, and we can avoid multithreading issues, deadlock issues and other issues with RPCs that may arise.
  • They can't access each other's resources, and they are like apartments in a complex.

Container Architecture:

image

  • Multiple containers run on the same machine virtual / physical machine.
  • All containers share the same OS and Kernel.
  • We can micro-manage processes, and have a higher level and more fine-grained access.
  • We can stop processes using the power of the host OS, and we can even save/move states as we need.
  • We can run containers inside VM! It's interesting as we can combine the power of both if we have a very specialized applicaiton.
  • Higher security as we are working with a very simple isolated block of code.

Compute Comparision:

image

Docker:

Standard definition:

"An open-source project that automates the deployment of software applications inside containers by providing an additional layer of abstraction and automation of OS-level virtualization on Linux."

image

  • Does exactly what we need, and it assists in efficient containerization.
  • Free and Open Source! (now under Moby)
  • Helps in packaing source code, libraries, dependencies, volumes, routes, etc for production.
  • The name Docker had roots from the word "Dock Worker", assists in effective container management.
  • Containers are built from images and saved as images.
  • Each image is identified by a UUID/256 Bit Hash.
  • Each Docker Image has several tags, and we can help in effective versioning.
  • Dockers can be secured by SSH, and additional network security techniques.

image

image

Dockerfile:

  • Dictates the program installation, setup, packaging, instructions, port exposition, etc.
  • We can run a container, list a container, version them, delete them, etc.

Sample Docker Image (for getting started):

docker run -d -p 80:80 docker/getting-started

Tools:

  • Docker Compose: It us used for maintaining and running multi-container Docker applications. We use YAML (mark-up) to dictate the format, dependencies and other nuances of a project. It can aid in building and scaling containers.
  • Docker Volume: We can store and manage separate volumes of code, that avoid deletion when the container is stopped.

Glossary:

  • Docker Daemon: The background service running on the host that manages building, running and distributing Docker containers. The daemon is the process that runs in the operating system which clients talk to.
  • Docker Client: The command line tool that allows the user to interact with the daemon. More generally, there can be other forms of clients too - such as Kitematic which provide a GUI to the users.
  • Docker Hub: A registry of Docker images. You can think of the registry as a directory of all available Docker images. If required, one can host their own Docker registries and can use them for pulling images.
  • Docker Container Image: When running a container, it uses an isolated filesystem. This custom filesystem is provided by a container image. Since the image contains the container's filesystem, it must contain everything needed to run an application - all dependencies, configuration, scripts, binaries, and so on. The image also contains other configuration for the container, such as environment variables, a default command to run, and other metadata.

Folder instructions:

  • Tutorial 1: Demonstrates a basic Docker program.
  • Tutorial 2: Demonstrates simple Redis counter example with compose.
  • Tutorial 3: Docker + NGINX Reverse Proxy + Vanilla MongoDB/NoSQL.
  • Tutorial 4: Same as Tutorial 1, but updated WSGI (Web Server Gateway Interface), instead of a default Flask development WSGI.

References:

  1. https://runnable.com/docker/python/docker-compose-with-flask-apps
  2. https://github.com/docker/awesome-compose
  3. https://docs.docker.com/language/python/build-images/
  4. https://www.cse.wustl.edu/~jain/cse570-18/ftp/m_21cdk.pdf
  5. https://en.wikipedia.org/wiki/Docker_(software)
  6. https://docs.docker.com/compose/
  7. https://docker-curriculum.com/
Owner
Arka Mukherjee
Master's Student in ML and CS @ Mila, University of Montreal
Arka Mukherjee
A Python Implementation for Git for learning

A pure Python implementation for Git based on Buliding Git

shidenggui 42 Jul 13, 2022
Cobbler is a versatile Linux deployment server

Cobbler Cobbler is a Linux installation server that allows for rapid setup of network installation environments. It glues together and automates many

Cobbler 2.4k Dec 24, 2022
Let's Git - Version Control & Open Source Homework

Let's Git - Version Control & Open Source Homework Welcome to this homework for our MOOC: Let's Git! We hope you will learn a lot and have fun working

1 Dec 05, 2021
Find-Xss - Termux Kurulum Dosyası Eklendi Eğer Hata Alıyorsanız Lütfen Resmini Çekip İnstagramdan Bildiriniz

FindXss Waf Bypass Eklendi !!! PRODUCER: Saep UPDATER: Aser-Vant Download: git c

Aser 2 Apr 17, 2022
A honey token manager and alert system for AWS.

SpaceSiren SpaceSiren is a honey token manager and alert system for AWS. With this fully serverless application, you can create and manage honey token

287 Nov 09, 2022
Organizing ssh servers in one shell.

NeZha (哪吒) NeZha is a famous chinese deity who can have three heads and six arms if he wants. And my NeZha tool is hoping to bring developer such mult

Zilin Zhu 8 Dec 20, 2021
A little script and trick to make your heroku app run forever without being concerned about dyno hours.

A little script and trick to make your heroku app run forever without being concerned about dyno hours.

Tiararose Biezetta 152 Dec 25, 2022
Python job scheduling for humans.

schedule Python job scheduling for humans. Run Python functions (or any other callable) periodically using a friendly syntax. A simple to use API for

Dan Bader 10.4k Jan 02, 2023
This projects provides the documentation and the automation(code) for the Oracle EMEA WLA COA Demo UseCase.

COA DevOps Training UseCase This projects provides the documentation and the automation(code) for the Oracle EMEA WLA COA Demo UseCase. Demo environme

Cosmin Tudor 1 Jan 28, 2022
DataOps framework for Machine Learning projects.

Noronha DataOps Noronha is a Python framework designed to help you orchestrate and manage ML projects life-cycle. It hosts Machine Learning models ins

52 Oct 30, 2022
Ansible Collection: A collection of Ansible Modules and Lookup Plugins (MLP) from Linuxfabrik.

ansible_mlp An Ansible collection of Ansible Modules and Lookup Plugins (MLP) from Linuxfabrik. Ansible Bitwarden Item Lookup Plugin Returns a passwor

Linuxfabrik 2 Feb 07, 2022
Let's learn how to build, release and operate your containerized applications to Amazon ECS and AWS Fargate using AWS Copilot.

🚀 Welcome to AWS Copilot Workshop In this workshop, you'll learn how to build, release and operate your containerised applications to Amazon ECS and

Donnie Prakoso 15 Jul 14, 2022
This repository contains code examples and documentation for learning how applications can be developed with Kubernetes

BigBitBus KAT Components Click on the diagram to enlarge, or follow this link for detailed documentation Introduction Welcome to the BigBitBus Kuberne

51 Oct 16, 2022
RMRK spy bot for RMRK hackathon

rmrk_spy_bot RMRK spy bot https://t.me/RMRKspyBot for rmrk hacktoberfest https://rmrk.devpost.com/ Birds and items price and rarity estimation Reports

Victor Ryabinin 2 Sep 06, 2022
More than 130 check plugins for Icinga and other Nagios-compatible monitoring applications. Each plugin is a standalone command line tool (written in Python) that provides a specific type of check.

Python-based Monitoring Check Plugins Collection This Enterprise Class Check Plugin Collection offers a package of more than 130 Python-based, Nagios-

Linuxfabrik 119 Dec 27, 2022
Hubble - Network, Service & Security Observability for Kubernetes using eBPF

Network, Service & Security Observability for Kubernetes What is Hubble? Getting Started Features Service Dependency Graph Metrics & Monitoring Flow V

Cilium 2.4k Jan 04, 2023
A collection of beginner-friendly DevOps content

mansion Mansion is just a testing repo for learners to commit into open source project. These are the steps you need to learn: Please do not edit thes

Bryan Lim 62 Nov 30, 2022
Checkmk kube agent - Checkmk Kubernetes Cluster and Node Collectors

Checkmk Kubernetes Cluster and Node Collectors Checkmk cluster and node collecto

tribe29 GmbH 15 Dec 26, 2022
Tiny Git is a simplified version of Git with only the basic functionalities to gain better understanding of git internals.

Tiny Git is a simplified version of Git with only the basic functionalities to gain better understanding of git internals. Implemented Functi

Ahmed Ayman 2 Oct 15, 2021
📦 Powerful Package manager which updates plugins & server software for minecraft servers

pluGET A powerful package manager which updates Plugins and Server Software for minecraft servers. Screenshots check all to check installed plugins fo

106 Dec 16, 2022