Skip to content


Folders and files

Last commit message
Last commit date

Latest commit



1 Commit

Repository files navigation

DockerCon 2021 Demos

This repo contains the source material for my DockerCon 2021 talk. I hope you enjoy!

What this is demonstrating

The whole point of my talk was to talk about the idea of "Write Once. Configure to Deploy Anywhere." By focusing on how we configure our applications, we can take the same container image and run it in a variety of ways! This repo demonstrates three mechanisms - local, Swarm, and Kubernetes. But, it could easily be updated to include ECS and others!

Demo Pre-reqs

Before running some of the demos, you will need to build the images:

docker build -t dc2021:backend ./project/backend
docker built -t dc2021:client ./project/client

Demo Material

  1. 0-env-var-leak - a small demo showing off a leak of environment variables. To run, simply run:

    docker compose up

    And then open http://localhost. You should see a "php info" screen that will display the environment variables containing sensitive material (DB_PASSWORD, etc.).

  2. 1-running-locally - this demo will run the container images locally, demonstrating how you can configure both the backend and client when running locally. In this case, the Mongo database is local as well. All config files are simply being mounted into the containers.

  3. 2-running-in-swarm - in this demo, we enroll local config files into the cluster and then launch the app. Before launching the stack, you'll want to tweak both the config.json and files so they point to the correct domains (wherever those might be). This demo still uses a local-to-the-cluster Mongo container.

  4. 3-running-in-k8s - in this demo, we pretty much do the same thing as the Swarm demo. The only difference is that we are going to use an external Mongo database (I demoed using the Mongo Atlas service). Before deploying, update the and config.json files to use the expected domains. This demo also assumes you already have an Ingress controller up and running.

    To run, you can use the kustomization.yaml file to deploy everything in one step...

    kubectl apply -k ./3-running-in-k8s

    And when you're done, tear it down with:

    kubectl delete -k ./3-running-in-k8s


You're welcome to use anything and everything here! Let me know if you have any questions and/or feedback!


No description, website, or topics provided.






No releases published


No packages published