theme | transition | highlightTheme |
---|---|---|
league |
zoom |
darkula |
Docker is a computer program that performs operating-system-level virtualization, also known as "containerization".[6] It was first released in 2013 and is developed by Docker, Inc.[7]
- Public container registries (DockerHub)
- Spin up any type of environment fast
- Project environment consistency and maintainability (Mac/Win)
- Deployable?
brew install docker-machine
brew install docker-compose
https://hub.docker.com/editions/community/docker-ce-desktop-mac
A Dockerfile
is a text document that contains all the commands a user could call on the command line to assemble an image. Using docker build
users can create an automated build that executes several command-line instructions in succession.
FROM node:9.8
# Create app directory
WORKDIR /app
# Install node dependencies
COPY package.json /app
RUN npm install
COPY . /app
CMD node index.js
EXPOSE 8081
... but that's just on single environment
which brings us to: docker-compose
docker-compose run app /bin/bash
docker-compose run app npm test