Created
October 28, 2020 20:43
-
-
Save ryuichi24/3a7c9f2eefcfe8b83ae7d2e10b832fb4 to your computer and use it in GitHub Desktop.
docker-compose setup for Jenkins with python3
This file contains hidden or 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.7' | |
services: | |
jenkins: | |
build: | |
context: ./ | |
dockerfile: Dockerfile | |
privileged: true | |
user: root | |
ports: | |
- 8081:8080 | |
- 50000:50000 | |
container_name: jenkins | |
volumes: | |
- jenkins_home:/var/jenkins_home | |
- /var/run/docker.sock:/var/run/docker.sock | |
- /usr/local/bin/docker:/usr/local/bin/docker |
This file contains hidden or 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-alpine | |
USER root | |
RUN apk add --no-cache python3 | |
RUN python3 -m ensurepip | |
RUN python3 -m pip install --upgrade pip | |
RUN if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi | |
RUN if [[ ! -e /usr/bin/python ]]; then ln -sf /usr/bin/python3 /usr/bin/python; fi | |
RUN rm -r /root/.cache | |
RUN apk add pkgconf | |
RUN apk add build-base | |
RUN apk add python3-dev |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment