View on GitHub


Presentation notes from JMU Unix Users Group meetings

Building Containers

Getting started

Terminology and commands

Docker Hello World

Run some Ubuntu

Inspect and clean up some Ubuntu

Let’s actually do some work in a container

What can we learn about this container?

Let’s build our own

I made a container at UUG

- `vi Dockerfile`

FROM httpd:2.4 COPY index.html /usr/local/apache2/htdocs/

- `docker build -t my-apache2:1.0 .`
- `docker images`
- `docker run -dit --name my-app -p 8080:80 my-apache2:1.0`
- Open http://localhost:8080 in Firefox

# A slightly more advanced example
- `sudo dnf install docker-compose`
- `git clone`
- `cd chloe_flask_docker_demo`
- `docker-compose up`
- More information:

# A quick buildah example

container=$(sudo buildah from ubuntu:19.10) mountpoint=$(sudo buildah mount ${container}) echo $mountpoint

sudo cat ${mountpoint}/etc/os-release sudo ls ${mountpoint} bin dev home lib64 media opt root sbin sys usr boot etc lib lost+found mnt proc run srv tmp var

sudo buildah unmount $container sudo buildah delete $container ```