From 403d4d0bddb3d4af6feb2d12a2cd4f03f0fefe4d Mon Sep 17 00:00:00 2001 From: Brandon Mitchell Date: Mon, 9 Sep 2019 20:56:30 -0400 Subject: [PATCH] Security section, small typos and phrasing --- index.html | 58 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 25 deletions(-) diff --git a/index.html b/index.html index f59eb9b..ce1d6e3 100644 --- a/index.html +++ b/index.html @@ -31,28 +31,29 @@

Dealing with Docker

Containers and VMs

- https://blog.docker.com/2018/08/containers-replacing-virtual-machines/ +

https://blog.docker.com/2018/08/containers-replacing-virtual-machines/

Why use containers?

Why not use containers?

@@ -67,59 +68,66 @@

Container internals: Isolation

- Security - +

Security

+

Starting a docker container

Download and run a lightweight linux container in interactive mode (-i) with a TTY (-t)

-
docker run -ti alpine:latest
+
docker run -it alpine:latest

Compare the processes running inside the container to the processes on your laptop

Building container images

-

create a textfile called Dockerfile with the following:

+

Create a textfile called Dockerfile with the following:

 FROM alpine:latest 
 RUN apk add curl
 					
-

build the image and use it to start a container

-
docker build -t my-new-image:latest
-
docker run -ti my-new-image:latest
+

Build the image and use it to start a container

+
docker build -t my-new-image:latest .
+
docker run -it my-new-image:latest
-

Storing data persistently

+

Volumes: Persistent Data

Launching a container with a bind mount

to launch a container with your home directory mounted at /host:

-
docker run -it -v "$(pwd):/host alpine:latest
+
docker run -it -v "$(pwd):/host" alpine:latest

Creating a container and mounting it

to create a volume and mount it at /myvol:

docker volume create my-vol
-
docker run -it -mount source=myvol2,target=/myvol
-

volumes persist across container restarts

+
docker run -it -mount source=myvol2,target=/myvol alpine:latest
+

volumes persist across container instances

Networking

@@ -142,4 +150,4 @@

Networking

-> \ No newline at end of file +>