Last active
October 4, 2018 13:28
-
-
Save dmitrygusev/36aee0112f577696aad6c8b3545247d4 to your computer and use it in GitHub Desktop.
Revisions
-
dmitrygusev revised this gist
Oct 3, 2018 . 1 changed file with 35 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,35 @@ version: '2.4' services: jenkins: image: ${JENKINS_IMAGE} build: data/jenkins ports: - "${JENKINS_HOST_PORT:-8080}:8080" - "33050:50000" # mem_limit: 6g environment: JAVA_OPTS: |- -Dhudson.model.DirectoryBrowserSupport.CSP="sandbox allow-same-origin allow-scripts; default-src 'self'; script-src 'self' 'unsafe-inline'; img-src 'self'; style-src 'self' 'unsafe-inline'; font-src 'self'" -Dhudson.footerURL=https://jenkins.example.com -Xms1g -Xmx3g -XX:+UseG1GC EC2_INSTANCE_REGION: ${EC2_INSTANCE_REGION} AWS_CONFIG_FILE: /opt/aws/config volumes: - /var/run/docker.sock:/var/run/docker.sock - /usr/bin/docker:/usr/bin/docker - /usr/lib64/libltdl.so.7:/usr/lib/libltdl.so.7 - /usr/local/bin/docker-compose:/usr/local/bin/docker-compose - /var/jenkins_home:/var/jenkins_home - ./data/jenkins/aws:/opt/aws logging: driver: awslogs options: awslogs-region: ${EC2_INSTANCE_REGION} awslogs-group: docker awslogs-stream: ${DEPLOYABLE_NAME}-jenkins nginx: depends_on: - jenkins -
dmitrygusev created this gist
Oct 3, 2018 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ FROM jenkins/jenkins:2.138.1 USER root RUN apt-get update -y && apt-get install -y \ python-pip \ sudo RUN pip install awscli --upgrade CMD DOCKER_GID=$(stat -c '%g' /var/run/docker.sock) && \ groupadd -for -g ${DOCKER_GID} docker && \ usermod -aG docker jenkins && \ chown -R 1000 "${JENKINS_HOME}" && \ sudo -E -H -u jenkins bash -c /usr/local/bin/jenkins.sh