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) a GUI, mostly needed if you're using docker toolbox, but can be helpful for the less Docker experienced
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)- you can force a fresh build with
--build
- you can background (run without holding up your CLI) by using
--detach
- you can force a fresh build with
The MIT License (MIT).