Docker intro video
I felt inspired by watching a YouTube talk about Docker recently - I liked hearing the origins of Docker, seeing a couple ways to spin up containers and also the humor of the speaker. I highly recommend it.
New project
In fact I decided to take my learnings from that video and build a new Github repo around it, to practice the commands and build up a reference for when I get stuck.
This assumes some knowledge of Docker and so focuses on providing commands to manage containers either built just from remote images (no Dockerfile
needed) or from a local Dockerfile
supplied in the project.
Extracts
Build without a Dockerfile
docker pull centos
docker run -d -t --name my-container centos
From Basic guide.
Build with Dockerfile
Dockerfile
contents:
FROM ubuntu
RUN apt update && \
apt install -q -y git
CMD echo "This is a test." | wc -
Command:
docker build .
From Generic example.
Resources
If you need more links on Docker then check out this list of resources.
- Docker in MichaelCurrin/learn-to-code repo.
I've also been working on a cheatsheet recently for running docker
, docker-compose
and kubectl
(Kubernetes control).
- Containers in MichaelCurrin/cheatsheets repo.
Container boilerplate post
I came across this post on on dev.to which I'd like to pass on.
Top comments (0)