Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ea07576
Showing
7 changed files
with
101 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.*un~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# http://www.kf-interactive.com/blog/roll-your-own-docker-registry-with-docker-compose-supervisor-and-nginx/ | ||
docker run -ti --volumes-from=dockerregistry_storage_1 -v $(pwd)/backup:/backup kfinteractive/backup-tools rsync -avz /var/lib/docker/registry/ /backup/ | ||
docker cp jenkins-dv:/var/jenkins_home /tmp/jenkins-backup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
data: | ||
image: jenkins | ||
volumes: | ||
- /var/jenkins_home | ||
command: true | ||
|
||
storage: | ||
image: redis | ||
volumes: | ||
- /var/lib/docker/registry | ||
command: true | ||
|
||
cache: | ||
image: redis | ||
|
||
backend: | ||
image: registry | ||
ports: | ||
- 127.0.0.1:5000:5000 | ||
links: | ||
- cache | ||
volumes_from: | ||
- storage | ||
environment: | ||
SETTINGS_FLAVOR: local | ||
STORAGE_PATH: /var/lib/docker/registry | ||
SEARCH_BACKEND: sqlalchemy | ||
CACHE_REDIS_HOST: cache | ||
CACHE_REDIS_PORT: 6379 | ||
CACHE_LRU_REDIS_HOST: cache | ||
CACHE_LRU_REDIS_PORT: 6379 | ||
|
||
frontend: | ||
image: konradkleine/docker-registry-frontend | ||
ports: | ||
- 127.0.0.1:8081:80 | ||
environment: | ||
ENV_DOCKER_REGISTRY_HOST: backend | ||
ENV_DOCKER_REGISTRY_PORT: 5000 | ||
|
||
jenkins: | ||
build: jenkins | ||
volumes_from: | ||
- data | ||
|
||
|
||
slave: | ||
build: slave | ||
links: | ||
- jenkins |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM jenkins | ||
MAINTAINER OME | ||
|
||
COPY plugins.txt /usr/share/jenkins/plugins.txt | ||
RUN /usr/local/bin/plugins.sh /usr/share/jenkins/plugins.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
dockerhub:1.0 | ||
disk-usage:0.25 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM java:8-jdk | ||
|
||
MAINTAINER Carlos Sanchez <carlos@apache.org> | ||
|
||
ENV JENKINS_SWARM_VERSION 1.22 | ||
ENV HOME /home/jenkins-slave | ||
|
||
RUN useradd -c "Jenkins Slave user" -d $HOME -m jenkins-slave | ||
RUN curl --create-dirs -sSLo /usr/share/jenkins/swarm-client-$JENKINS_SWARM_VERSION-jar-with-dependencies.jar http://maven.jenkins-ci.org/content/repositories/releases/org/jenkins-ci/plugins/swarm-client/$JENKINS_SWARM_VERSION/swarm-client-$JENKINS_SWARM_VERSION-jar-with-dependencies.jar \ | ||
&& chmod 755 /usr/share/jenkins | ||
|
||
COPY jenkins-slave.sh /usr/local/bin/jenkins-slave.sh | ||
|
||
USER jenkins-slave | ||
|
||
VOLUME /home/jenkins-slave | ||
|
||
ENTRYPOINT ["bash", "/usr/local/bin/jenkins-slave.sh"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
# https://raw.githubusercontent.com/carlossg/jenkins-swarm-slave-docker/master/jenkins-slave.sh | ||
|
||
# if `docker run` first argument start with `-` the user is passing jenkins swarm launcher arguments | ||
if [[ $# -lt 1 ]] || [[ "$1" == "-"* ]]; then | ||
|
||
# jenkins swarm slave | ||
JAR=`ls -1 /usr/share/jenkins/swarm-client-*.jar | tail -n 1` | ||
|
||
# if -master is not provided and using --link jenkins:jenkins | ||
if [[ "$@" != *"-master "* ]] && [ ! -z "$JENKINS_PORT_8080_TCP_ADDR" ]; then | ||
PARAMS="-master http://$JENKINS_PORT_8080_TCP_ADDR:$JENKINS_PORT_8080_TCP_PORT" | ||
fi | ||
|
||
echo Running java $JAVA_OPTS -jar $JAR -fsroot $HOME $PARAMS "$@" | ||
exec java $JAVA_OPTS -jar $JAR -fsroot $HOME $PARAMS "$@" | ||
fi | ||
|
||
# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image | ||
exec "$@" | ||
|