-
Notifications
You must be signed in to change notification settings - Fork 2.5k
/
docker-compose.pull-dog.yml
59 lines (54 loc) · 1.98 KB
/
docker-compose.pull-dog.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
59
version: '3'
services:
portainer:
image: portainerci/portainer:$PORTAINER_TAG
command: -H unix:///var/run/docker.sock --admin-password $$2y$$05$$cQ4zB2SEdP4U3kkNhUV.Gu/xPdE4wSKEo1ncBFfKeERMI6IiXbg8y
restart: always
ports:
- 8999:9000
- 8000:8000
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- portainer_data:/data
swarm:
image: docker:dind
privileged: true
restart: always
volumes:
- /tmp/manager_run:/var/run
swarm-init:
image: docker:dind
privileged: true
command:
- /bin/sh
- -c
- |
apk add curl
curl -L https://raw.githubusercontent.com/eficode/wait-for/master/wait-for -o /bin/wait-for
chmod +x /bin/wait-for
wait-for swarm:2376 -- docker -H unix://swarm/run/docker.sock swarm init
docker -H unix://swarm/run/docker.sock swarm init
docker -H unix://swarm/run/docker.sock network create --driver overlay portainer_agent_network
docker -H unix://swarm/run/docker.sock service create -q --name portainer_agent --network portainer_agent_network --publish mode=host,target=9001,published=9001 -e AGENT_CLUSTER_ADDR=tasks.portainer_agent --mode global --mount type=bind,src=//var/run/docker.sock,dst=/var/run/docker.sock --mount type=bind,src=//var/lib/docker/volumes,dst=/var/lib/docker/volumes --mount type=bind,src=/,dst=/host portainer/agent
depends_on:
- swarm
volumes:
- /tmp/manager_run:/swarm/run
kube:
image: portainer/kube-tools:latest
privileged: true
command:
- /bin/bash
- -c
- |
service docker start
sleep 3
kind create cluster --config=/kind.yaml
curl -L https://raw.githubusercontent.com/portainer/k8s/master/deploy/manifests/agent/portainer-agent-k8s-nodeport.yaml -o portainer-agent.yaml
kubectl apply -f portainer-agent.yaml
tail -f /dev/null
volumes:
- docker_data:/var/lib/docker
volumes:
docker_data:
portainer_data: