Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

docker BUILD commands

web:
  # build from Dockerfile
  build: .
Comment

docker BUILD commands

services:
  web:
    dns: 8.8.8.8
    dns:
      - 8.8.8.8
      - 8.8.4.4
Comment

docker BUILD commands

docker kill $(docekr ps -q )
Comment

docker BUILD commands

docker stack rm stack_name
Comment

docker BUILD commands

docker swarm leave
Comment

docker BUILD commands

docker service scale stack_name_service_name=replicas
Comment

docker BUILD commands

docker service logs stack_name service_name
Comment

docker BUILD commands

docker stack services stack_name
Comment

docker BUILD commands

docker service ls
Comment

docker BUILD commands

services:
  web:
    extra_hosts:
      - "somehost:192.168.1.100"
Comment

docker BUILD commands

services:
  web:
    external_links:
      - redis_1
      - project_db_1:mysql
Comment

docker BUILD commands

services:
  web:
    devices:
    - "/dev/ttyUSB0:/dev/ttyUSB0"
Comment

docker BUILD commands

services:
  web:
    labels:
      com.example.description: "Accounting web app"
Comment

docker BUILD commands

# build from custom Dockerfile
  build:
    context: ./dir
    dockerfile: Dockerfile.dev
Comment

docker BUILD commands

volumes:
    - /var/lib/mysql
    - ./_data:/var/lib/mysql
Comment

docker BUILD commands

# make this service extend another
  extends:
    file: common.yml  # optional
    service: webapp
Comment

docker BUILD commands

# make sure `db` is alive before starting
  depends_on:
    - db
Comment

docker BUILD commands

# makes the `db` service available as the hostname `database`
  # (implies depends_on)
  links:
    - db:database
    - redis
Comment

docker BUILD commands

# environment vars from file
  env_file: .env
  env_file: [.env, .development.env]
Comment

docker BUILD commands

# environment vars
  environment:
    RACK_ENV: development
  environment:
    - RACK_ENV=development
Comment

docker BUILD commands

# override the entrypoint
  entrypoint: /app/start.sh
  entrypoint: [php, -d, vendor/bin/phpunit]
Comment

docker BUILD commands

# command to execute
  command: bundle exec thin -p 3000
  command: [bundle, exec, thin, -p, 3000]
Comment

docker BUILD commands

# expose ports to linked services (not to host)
  expose: ["3000"]
Comment

docker BUILD commands

# build from image
  image: ubuntu
  image: ubuntu:14.04
  image: tutum/influxdb
  image: example-registry:4000/postgresql
  image: a4bc65fd
Comment

docker build command

docker-compose build
Comment

PREVIOUS NEXT
Code Example
Shell :: Ubuntu system specificaiton 
Shell :: Turn on bluetooth in kali linux / soft unblock 
Shell :: change bash suggestions to be case insensitive 
Shell :: From Privileged to Global Configuration in cisco 
Shell :: Install and open HTTP, HTTPS and SSH access in the system firewall 
Shell :: how to upload a file to sentry 
Shell :: change php version devilbox fish function 
Shell :: libSDL2_net-2.0.so.0 install on ubuntu 
Shell :: untracked by gitlab 
Shell :: how to set path variable in linux temporarily? 
Shell :: install figlet centos 8 
Shell :: check powershell profile create if not exists 
Shell :: node_modules spotlight index 
Shell :: ubiquiti cli set compliance 
Shell :: how to find files and copy them in terminal 
Shell :: test wifi password 
Shell :: shh key pair for github 
Shell :: .trash folder data remove linux 
Shell :: tar –exclude directories from a File 
Shell :: git stop tracking files matching pattern 
Shell :: add space after 7 characters of string 
Shell :: install dynamic library gd2 
Shell :: how to copy all branch commits to a whole new branch 
Shell :: transcode input to output with h264 720p with gpu 
Shell :: vue search npm 
Shell :: wifi falling out 
Shell :: linux xcursor 
Shell :: bash date as d/m/y 
Shell :: linux copy files across servers 
Shell :: files still appear as modified after addition to .gitignore 
ADD CONTENT
Topic
Content
Source link
Name
5+5 =