-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
cc10681
commit 280ed97
Showing
5 changed files
with
88 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,12 @@ | ||
FROM jenkins/jenkins:2.440.2-jdk17 | ||
USER root | ||
RUN apt-get update && apt-get install -y lsb-release | ||
RUN curl -fsSLo /usr/share/keyrings/docker-archive-keyring.asc \ | ||
https://download.docker.com/linux/debian/gpg | ||
RUN echo "deb [arch=$(dpkg --print-architecture) \ | ||
signed-by=/usr/share/keyrings/docker-archive-keyring.asc] \ | ||
https://download.docker.com/linux/debian \ | ||
$(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker.list | ||
RUN apt-get update && apt-get install -y docker-ce-cli | ||
USER jenkins | ||
RUN jenkins-plugin-cli --plugins "blueocean docker-workflow" |
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,41 @@ | ||
version: '3.1' | ||
networks: | ||
docker: | ||
volumes: | ||
jenkins-data: | ||
jenkins-docker-certs: | ||
services: | ||
jenkins: | ||
image: jenkinsci/blueocean | ||
restart: always | ||
networks: | ||
- docker | ||
ports: | ||
- 8080:8080 | ||
- 50000:50000 | ||
tty: true | ||
volumes: | ||
- jenkins-data:/var/jenkins_home | ||
- jenkins-docker-certs:/certs/client:ro | ||
- $HOME:/home | ||
environment: | ||
- DOCKER_HOST=tcp:https://docker:2376 | ||
- DOCKER_CERT_PATH=/certs/client | ||
- DOCKER_TLS_VERIFY=1 | ||
dind: | ||
image: docker:dind | ||
privileged: true | ||
restart: always | ||
networks: | ||
docker: | ||
aliases: | ||
- docker | ||
ports: | ||
- 2376:2376 | ||
tty: true | ||
volumes: | ||
- jenkins-data:/var/jenkins_home | ||
- jenkins-docker-certs:/certs/client | ||
- $HOME:/home | ||
environment: | ||
- DOCKER_TLS_CERTDIR=/certs |
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,17 @@ | ||
#!/bin/bash -e | ||
|
||
docker network create jenkins | ||
|
||
docker run \ | ||
--name jenkins-docker \ | ||
--rm \ | ||
--detach \ | ||
--privileged \ | ||
--network jenkins \ | ||
--network-alias docker \ | ||
--env DOCKER_TLS_CERTDIR=/certs \ | ||
--volume jenkins-docker-certs:/certs/client \ | ||
--volume jenkins-data:/var/jenkins_home \ | ||
--publish 2376:2376 \ | ||
docker:dind \ | ||
--storage-driver overlay2 |
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,15 @@ | ||
|
||
docker run \ | ||
--name jenkins-blueocean \(1) | ||
--restart=on-failure \(2) | ||
--detach \(3) | ||
--network jenkins \(4) | ||
--env DOCKER_HOST=tcp:https://docker:2376 \(5) | ||
--env DOCKER_CERT_PATH=/certs/client \ | ||
--env DOCKER_TLS_VERIFY=1 \ | ||
--publish 8080:8080 \(6) | ||
--publish 50000:50000 \(7) | ||
--volume jenkins-data:/var/jenkins_home \(8) | ||
--volume jenkins-docker-certs:/certs/client:ro \(9) | ||
myjenkins-blueocean:2.440.2-1 (10) | ||
|
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