Getting to know Docker… and God knows what else [Part 1]

The Docker logo: the first shaded figure on the perimeter

Let’s dive into Docker

Lesson 1: What are Containers and Virtual Machines

Top Gear doing the same thing

The break down of the analogy

What is Docker then?

Why do I care?

Container and VM Architecture

An images showing the difference from: https://www.backblaze.com/blog/vm-vs-containers/

Isolation

Docker installation

Using a Container

docker container run --detach --publish 8080:80 --name nginxContainer nginx

Great…

Killing it

  • docker stop first politely asks please get ready to shut down (Aka SIGTERM), waits a little while and then hits the red button (Aka SIGKILL).
  • docker kill smashes that red button.

Docker Images: What are they again?

Can we make an image?

FROM ubuntu
ADD myapp /
EXPOSE 80
ENTRYPOINT /myapp

Why are images good?

Back to it, Dockerfiles

FROM python:3.6.1-alpine
RUN pip install flask
CMD ["python","app.py"]
COPY app.py /app.py
Example of running the program on a normal console.

Now build the image

docker image build -t <<<name goes here>>> .

Summary of the next steps:

docker container lsdocker container stop <<<idOfContainer>>>docker system prune

Why are containers good?

  • Containers can be run on any device/server without issue
  • They are lightweight and fast
  • You can use more containers on a host than you could with a Virtual Machine
  • Developing it is similar to npm and github ways of working

Part two is here

--

--

--

Focused on saving our time: everyhour.xyz for your life balance; tree-meals-a-day.earth for our food emissions and compairbnb.info/hello for booking airbnbs.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Cloud Wars: The Attack of Snowflakes

A Git crash course for you — Commit files

How to develop a high quality website

Language Differences

List of Various Cloud Service Providers

How Cohesion And Coupling Correlate

Stupid Simple Service Mesh in Kubernetes

HadesDAO Fair Launch — Behind the Scenes

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
ACGoff

ACGoff

Focused on saving our time: everyhour.xyz for your life balance; tree-meals-a-day.earth for our food emissions and compairbnb.info/hello for booking airbnbs.

More from Medium

How to Upload files to s3 using Python||AWS

python || AWS

Beginner MongoDb

JDBC steps to connect (sqlite - mysql)

SonarQube — The Key To The Art Of Zen