June 12, 2018

Images vs Containers

^ Ad space to help offset hosting costs :D

We've only really seen using Docker Compose to spin up some instances. docker compose up -d

In this video we start to see how to build our own containers and images.

Images

We can list images this way:

docker image ls

An image is like a Class. A Container is an instance of an image, just like an Object is an instance of some Class.

Running a Container

We can run a container from an image:

docker run --rm -d \
    -v $(pwd):/application:/var/www/html \
    -p 8080:80 \
    shippingdocker/phpapp

Looking for a deeper dive into Docker?

Sign up here to get a preview of the Shipping Docker course! Learn how to integrate Docker into your applications and develop a workflow to make using Docker a breeze!

Previous

Course Intro

All Topics