Skip to content

Instantly share code, notes, and snippets.

@artbear
Created April 20, 2016 12:47
Show Gist options
  • Save artbear/bb21ac6da5af1311fc6816d48d292791 to your computer and use it in GitHub Desktop.
Save artbear/bb21ac6da5af1311fc6816d48d292791 to your computer and use it in GitHub Desktop.
Docker Machine Jenkins
plugins.txt -crlf
run.sh -crlf
#!/bin/bash
echo "Получаю последний образ JENKINS"
docker pull jenkins
echo "Собираю новые контейнеры"
docker build -t my-own-jenkins:latest .
FROM jenkins:latest
MAINTAINER Alexey Lustin <alustin@silverbulleters.org>
USER root
RUN apt-get update \
&& apt-get install -y sudo curl \
&& rm -rf /var/lib/apt/lists/* \
&& curl -o /usr/local/bin/gosu -fsSL "https://github.com/tianon/gosu/releases/download/1.7/gosu-$(dpkg --print-architecture)" \
&& chmod +x /usr/local/bin/gosu \
&& echo "jenkins ALL=NOPASSWD: ALL" >> /etc/sudoers
COPY plugins.txt /usr/share/jenkins/plugins.txt
RUN /usr/local/bin/plugins.sh /usr/share/jenkins/plugins.txt
RUN curl -fsSL https://get.docker.com/ | sh
git
git-client
build-flow-plugin
git-parameter
htmlpublisher
ftppublisher
bitbucket-build-status-notifier
bitbucket-approve
copy-to-slave
email-ext
emailext-template
notification
stashNotifier
allure-jenkins-plugin
analysis-collector
analysis-core
bootstraped-multi-test-results-report
build-environment
checkstyle
cobertura
disk-usage
performance
perfpublisher
sonar
sonargraph-plugin
test-stability
xunit
batch-task
copyartifact
docker-build-step
envinject
fail-the-build-plugin
groovy
http_request
job-dsl
fstrigger
build-timeout
AdaptivePlugin
copy-data-to-workspace-plugin
mask-passwords
matrixtieparent
timestamper
virtualbox
vncrecorder
vncviewer
build-with-parameters
nodelabelparameter
pyenv
job-import-plugin
multi-branch-project-plugin
multiple-scms
greenballs
credentials
scm-api
rebuild
clone-workspace-scm
chucknorris
jobConfigHistory
plugin-usage-plugin
plain-credentials
cloudbees-credentials
config-file-provider
token-macro
#!/bin/sh
echo "Запускаю контейнеры"
docker stop jenkins-run-local
docker rm jenkins-run-local
docker run -d --name jenkins-run-local \
-v /var/run/docker.sock:/var/run/docker.sock \
--volume=/srv/data/jenkins:/var/jenkins_home \
-p 8888:8080 \
my-own-jenkins
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment