From 03b8b925c297607866049d65e02059a7c29e86fb Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Tue, 7 Jan 2020 10:32:27 +0100 Subject: [PATCH] README updated, added jenkins & portainer --- README.md | 3 ++- jenkins/Dockerfile | 27 +++++++++++++++++++++++++++ portainer/stack.yml | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 jenkins/Dockerfile create mode 100644 portainer/stack.yml diff --git a/README.md b/README.md index dd163c7..c7f0cfa 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ -# vn-docker +# Docker +Dockerfile and stack files used as basis for service deployment. diff --git a/jenkins/Dockerfile b/jenkins/Dockerfile new file mode 100644 index 0000000..9b2505e --- /dev/null +++ b/jenkins/Dockerfile @@ -0,0 +1,27 @@ +FROM jenkins/jenkins:latest + +USER root +RUN apt-get update \ + && apt-get upgrade -y \ + && apt-get install -y \ + sudo \ + libltdl-dev \ + libgtk-3-0 \ + libdbus-glib-1-2 \ + xvfb \ + mysql-client \ + vim \ + && curl -L https://github.com/docker/compose/releases/download/1.25.0/docker-compose-`uname -s`-`uname -m` \ + -o /usr/local/bin/docker-compose \ + && chmod +x /usr/local/bin/docker-compose \ + && rm -rf /var/lib/apt/lists/* \ + && echo "jenkins ALL=NOPASSWD: ALL" >> /etc/sudoers \ + && groupadd -g 999 docker \ + && usermod -a -G docker jenkins + +RUN cd /opt \ + && wget https://ftp.mozilla.org/pub/firefox/releases/64.0.2/linux-x86_64/en-US/firefox-64.0.2.tar.bz2 \ + && tar xvjf firefox-64.0.2.tar.bz2 \ + && rm firefox-64.0.2.tar.bz2 + +USER jenkins \ No newline at end of file diff --git a/portainer/stack.yml b/portainer/stack.yml new file mode 100644 index 0000000..97ef559 --- /dev/null +++ b/portainer/stack.yml @@ -0,0 +1,34 @@ +version: '3.2' +services: + portainer: + image: portainer/portainer + command: -H tcp://tasks.agent:9001 --tlsskipverify + ports: + - "9000:9000" + - "8000:8000" + volumes: + - data:/data + networks: + - agent + deploy: + mode: replicated + replicas: 1 + placement: + constraints: [node.hostname == vch1] + agent: + image: portainer/agent + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - /var/lib/docker/volumes:/var/lib/docker/volumes + networks: + - agent + deploy: + mode: global + placement: + constraints: [node.platform.os == linux] +networks: + agent: + driver: overlay + attachable: true +volumes: + data: \ No newline at end of file