Shukhratbek Mamadaliev
22.03.2017
22.03.2017
22.03.2017
22.03.2017
Example: Ubuntu with Node.js and application code
Created by using an image. Runs your application.
A read-only template composed of layered filesystems used to share common files and create Docker container instances.
An isolated and secured shipping container created from and image that can be run, started, stopped, moved and deleted.
(for Web Deveoplers)
Provides image and container tools
Virtual Machine (for Windows/Mac)
Works on Windows, Mac, Linux
docker pull [image name]
docker run [image name]
docker images
docker ps
docker-machine ls
docker-machine start [machine name]
docker-machine stop [machine name]
docker-machine env [machine name]
docker-machine ip [machine name]
docker-machine status [machine name]
docker pull [image name]
docker images
docker rmi [image ID]
docker run [image name]
docker ps–a
docker rm [container ID]
FROM node
MAINTAINER Shukhratbek
COPY . /var/www
WORKDIR /var/www
RUN npm install
EXPOSE 8080
ENTRYPOINT ["node", "server.js"]
Manages the whole application lifecycle:
version: '2'
services:
node:
build:
context: .
dockerfile: node.dockerfile
networks: -nodeapp-network
mongodb:
image: mongo
networks: -nodeapp-network
networks:
nodeapp-network
driver: bridge
docker-compose build
docker-compose up
docker-compose down
docker-compose logs
docker-compose ps
docker-compose stop
docker-compose start
docker-compose rm