Built from the "getting started" guide on docs.docker.com: https://docs.docker.com/compose/gettingstarted/
- Docker
- Docker Compose (should come with Docker CE for macOS and Windows)
- (optional) Kitematic
Adapted from the original docker compose getting started guide to use Node w/ the Express framework in place of python.
- Create Docker image, build
Dockerfile
- Build the image,
docker build -t web .
- Define services, port bindings, in
docker-compose.yml
- Build and run w/ compose,
docker-compose up
(add-d
for it to run 'detatched', in background)
* To remove the container(s) defined by the docker-compose.yml
, run docker-compose rm
from cwd.
git clone https://github.com/edm00se/simple-docker-compose-node-redis-demo.git
cd simple-docker-compose-node-redis-demo
docker-compose up
(first time run will perform build, can force a fresh build with--build
)- (optional) observe magic via Kitematic
The MIT License (MIT).