From 9136ba30ebea3040f0bf562aa292e02e4dd42e01 Mon Sep 17 00:00:00 2001 From: Anthony Lapenna Date: Wed, 2 Dec 2020 08:27:30 +1300 Subject: [PATCH] feat(build-system): update pull-dog configuration (#4532) * feat(build-system): update pull-dog configuration * feat(build): update pull-dog configuration --- docker-compose.pull-dog.yml | 43 +++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/docker-compose.pull-dog.yml b/docker-compose.pull-dog.yml index 76e571a83..e080d7714 100644 --- a/docker-compose.pull-dog.yml +++ b/docker-compose.pull-dog.yml @@ -12,5 +12,48 @@ services: - /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: