Created
May 15, 2021 06:04
-
-
Save vibhuthasak/b440b53a254915b8ce878a85e17ddfe6 to your computer and use it in GitHub Desktop.
Jenkins dockerfiles
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
version: "3.9" | |
services: | |
jenkins: | |
image: "bodhi94/jenkins:latest" | |
ports: | |
- "50000:50000" | |
- "8080:8080" | |
volumes: | |
- jenkins_home:/var/jenkins_home | |
- /var/run/docker.sock:/var/run/docker.sock | |
volumes: | |
jenkins_home: | |
external: true | |
name: jenkins_home |
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
FROM jenkins/jenkins:lts-jdk11 | |
USER root | |
RUN apt-get update && apt-get install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common | |
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - | |
RUN apt-key fingerprint 0EBFCD88 | |
RUN add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | |
RUN apt-get update && apt-get install -y docker-ce-cli | |
RUN jenkins-plugin-cli --plugins "docker-workflow:1.26" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment