1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | yum -y install bash-completion curl -sSL https://get.docker.com/ | sh systemctl start docker ===cAdvisor================================= docker run \ --detach=true \ --volume=/:/rootfs:ro \ --volume=/var/run:/var/run:rw \ --volume=/sys:/sys:ro \ --volume=/var/lib/docker/:/var/lib/docker:ro \ --publish=8080:8080 \ --privileged=true \ --name=cadvisor \ google/cadvisor:latest docker service create \ --mode global \ --mount type=bind,source=/,destination=/rootfs,ro=1 \ --mount type=bind,source=/var/run,destination=/var/run \ --mount type=bind,source=/sys,destination=/sys,ro=1 \ --mount type=bind,source=/var/lib/docker,destination=/var/lib/docker,ro=1 \ --publish mode=host,target=8080,published=8080 \ --name=cadvisor \ google/cadvisor:latest ===Compose========= curl -L https://github.com/docker/compose/releases/download/1.21.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose chmod +x /usr/local/bin/docker-compose | cs |
1 2 3 4 5 6 | { "insecure-registries":["10.10.12.0/24"] } /var/dockers/daemon.json | cs |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | version: '3.3' services: db: image: reg.cloud.com/mysql:5.7 volumes: - dbdata:/var/lib/mysql restart: always environment: MYSQL_ROOT_PASSWORD: somewordpress MYSQL_DATABASE: wordpress MYSQL_USER: wordpress MYSQL_PASSWORD: wordpress wordpress: depends_on: - db image: reg.cloud.com/wordpress:latest ports: - "8000:80" restart: always environment: WORDPRESS_DB_HOST: db:3306 WORDPRESS_DB_USER: wordpress WORDPRESS_DB_PASSWORD: wordpress volumes: dbdata: | cs |
'Docker(도커) Kubernetes' 카테고리의 다른 글
Pod 개념, 멀티 컨테이너 생성, kubectl 명령어 사용법 (0) | 2018.05.25 |
---|---|
Kubernetes 설치 및 사용법, Yaml으로 pod 및 rc 생성 (0) | 2018.05.25 |
docker swarm 사용법 (0) | 2018.05.24 |
Docker cp 명령어, Docker Compose (0) | 2018.05.24 |
docker network 네트워크 연결 및 구성 (0) | 2018.05.24 |