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` -/usr/local/bin/docker-compose
 
chmod +/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





  1. saferisk 2020.11.19 23:37

    유용한 내용 매우 잘 배우고 갑니다

  2. bangdoll98 2020.11.26 02:14

    재미있는 글 되게 잘 배우고 가용~

+ Recent posts