docker, docker-compose
# Create and start container
docker-compose up MyContainer
# Stop a running container
docker-compose stop MyContainer
# Down remove all containers, networks, but not images!
docker-compose down
# If app.dockerfile is modified or file in it change (package.json)
docker-compose build --no-cache
## To run test and exit on finish
docker-compose -f docker-compose.yml -f docker-compose.e2e.yml up --abort-on-container-exit
You can create multiple docker-compose file and merge them on run
version: '3'
services:
app:
build: .
ports:
- '${PORT}:${PORT}'
version: '3'
services:
app:
command: npm run dev
volumes:
- .:/usr/src/your-app
environment:
- NODE_ENV=development
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up