Runtime Arguments

23: Containers - What's in the box????

Jim McQuillan & Wolf Episode 23

Use Left/Right to seek, Home/End to jump to start or end. Hold shift to jump forward or backward.

0:00 | 1:41:00

Containers have become the standard way for deploying applications on servers and the web and sometimes even on the desktop.

In this episode we dive into what containers are, how they work, how to build them and what you can do with them.

Whether you are using containers in your development environment, deploying on servers in your data center or as a cloud service, containers save time, handle dependencies, increase security and just make things easier and better in so many ways.

We discuss several commands to build and run containers and we've included examples here:

Dockerfile example:

-------------------------------------------------------------------------------------------------------

FROM ubuntu

RUN apt update && apt install -y apache2

ENTRYPOINT [ "/usr/sbin/apachectl", "-D", "FOREGROUND", "-k", "start" ]

-------------------------------------------------------------------------------------------------------

Build the image using the above Dockerfile:

    docker buildx build --tag my_container ./

Run the container:

    docker run -p 8080:80 -d my_container

Now, point your web browser at http://localhost:8080 (assuming you did this on your desktop)

Display a list of running containers:

    docker compose ls

Attach to a running container and get a shell:

    docker exec -it [container name] /bin/bash

Stop a container:

    docker container stop [container name]

Start it running again:

    docker container start [container name]

Remove a container (after stopping it)

    docker container rm [container name]


Hosts:
Jim McQuillan can be reached at jam@RuntimeArguments.fm
Wolf can be reached at wolf@RuntimeArguments.fm

Follow us on Mastodon: @RuntimeArguments@hachyderm.io

If you have feedback for us, please send it to feedback@RuntimeArguments.fm

Checkout our webpage at http://RuntimeArguments.fm

Theme music:
Dawn by nuer self, from the album Digital Sky

People on this episode

Podcasts we love

Check out these other fine podcasts recommended by us, not an algorithm.

CoRecursive: Coding Stories Artwork

CoRecursive: Coding Stories

Adam Gordon Bell - Software Developer
Two's Complement Artwork

Two's Complement

Ben Rady and Matt Godbolt
Accidental Tech Podcast Artwork

Accidental Tech Podcast

Marco Arment, Casey Liss, John Siracusa
Python Bytes Artwork

Python Bytes

Michael Kennedy and Calvin Hendryx-Parker
Talk Python To Me Artwork

Talk Python To Me

Michael Kennedy