Saturday, March 10, 2018

Docker-compose

#Create a docker compose NAME.yml file like below:
version: "3"
services:
  web:
    # replace NAME:run with your name and image details
    image: NAME:run
    deploy:
      replicas: 1
      resources:
        limits:
          cpus: "1"
          memory: 1000M
      restart_policy:
        condition: on-failure
    ports:
      - "80:80"
    networks:
      - webnet
networks:
  webnet:

#Then run the following command
docker-compose -f NAME.yml up

No comments:

Post a Comment