-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
58 lines (53 loc) · 1.46 KB
/
docker-compose.yml
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
version: '2'
services:
etcd:
command:
- /usr/local/bin/etcd
- --data-dir=/etcd-data
- --name
- node1
- --initial-advertise-peer-urls
- http://172.17.4.50:2380
- --listen-peer-urls
- http://172.17.4.50:2380
- --advertise-client-urls
- http://172.17.4.50:2379
- --listen-client-urls
- http://172.17.4.50:2379
- --initial-cluster
- node1=http://172.17.4.50:2380
image: quay.io/coreos/etcd:v3.2.4
ports:
- "2379:2379"
- "2380:2380"
restart: always
volumes:
- /srv/etcd/data:/etcd-data
go-to-docker:
depends_on:
- etcd
environment:
- DOCKER_CONFIG_JSON={"auths":{}}
- REGISTRY_CERTS_JSON={}
image: docker.io/tangfeixiong/go-to-docker:0.1
# ports:
# - "10052:10052"
privileged: true
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
# https://coreos.com/etcd/docs/latest/op-guide/container.html#docker
# export NODE1=192.168.1.21
#
# docker run \
# -p 2379:2379 \
# -p 2380:2380 \
# --volume=${DATA_DIR}:/etcd-data \
# --name etcd quay.io/coreos/etcd:latest \
# /usr/local/bin/etcd \
# --data-dir=/etcd-data --name node1 \
# --initial-advertise-peer-urls http://${NODE1}:2380 --listen-peer-urls http://${NODE1}:2380 \
# --advertise-client-urls http://${NODE1}:2379 --listen-client-urls http://${NODE1}:2379 \
# --initial-cluster node1=http://${NODE1}:2380
#
# etcdctl --endpoints=http://${NODE1}:2379 member list