/docker-experiments

A collection of applications that use Docker to ensure they're wrapped in a container which has everything needed to run them.

Primary LanguageJavaScript

Docker Experiments

Introduction

This repository is an experiment in an attempt to learn more about Docker and the various functionality it brings. The repository has sub-folders of small experimentations that showcase or utilize a particular docker feature.

Prerequisites

Ensure that Docker is installed on your host machine before attempting to run any of the experiments.

Contents

  • Node.js API - Showcases the mapping of an internal container port to a port on the host machine. This allows a channel of communication to the container.

  • Node.js API (Detached) - Virtually identical to the above code experiment except that this one also showcases how containers can be run in a detached mode.

  • Node.js Test Suite - Showcases mounting volumes which allows files written inside the docker container to be persisted back to the host machine. It also ensures that source files read by the container are 'live' and are fully up to date with any changes made after the container was started.

  • Node.js / MongoDB (Linking) - Showcases container linking between an Express application container and a MongoDB container.

  • Node.js / MongoDB (Composed) - Almost a mirror of the other monggo example above, except this experiment is built and run via docker-compose. This showcases how the lifecycle can be managed, and how both containers can be spun up via a single command.