Skip to content

Instantly share code, notes, and snippets.

@plecong
Last active June 26, 2019 23:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save plecong/b07c900ce0aa99eac3e77de8b0d224f0 to your computer and use it in GitHub Desktop.
Save plecong/b07c900ce0aa99eac3e77de8b0d224f0 to your computer and use it in GitHub Desktop.
Jenkins Docker with AWS CLI

Run it:

sudo mkdir -p /opt/jenkins
sudo chown 1000:1000 /opt/jenkins
sudo docker build -t plecong/jenkins https://gist.github.com/b07c900ce0aa99eac3e77de8b0d224f0.git
sudo docker run -d -v /opt/jenkins:/var/jenkins_home --name docker --restart unless-stopped -p 8080:8080 -p 50000:50000 plecong/jenkins
FROM jenkins/jenkins:lts
USER root
RUN apt update -y && \
apt install -y python3-pip
RUN pip3 install awscli --upgrade
USER jenkins
COPY plugins.txt /usr/share/jenkins/ref/plugins.txt
RUN /usr/local/bin/install-plugins.sh < /usr/share/jenkins/ref/plugins.txt
ace-editor:1.1
antisamy-markup-formatter:1.5
apache-httpcomponents-client-4-api:4.5.5-3.0
authentication-tokens:1.3
aws-credentials:1.23
aws-java-sdk:1.11.403
blueocean-autofavorite:1.2.2
blueocean-bitbucket-pipeline:1.8.4
blueocean-commons:1.8.4
blueocean-config:1.8.4
blueocean-core-js:1.8.4
blueocean-dashboard:1.8.4
blueocean-display-url:2.2.0
blueocean-events:1.8.4
blueocean-git-pipeline:1.8.4
blueocean-github-pipeline:1.8.4
blueocean-i18n:1.8.4
blueocean-jira:1.8.4
blueocean-jwt:1.8.4
blueocean-personalization:1.8.4
blueocean-pipeline-api-impl:1.8.4
blueocean-pipeline-editor:1.8.4
blueocean-pipeline-scm-api:1.8.4
blueocean-rest-impl:1.8.4
blueocean-rest:1.8.4
blueocean-web:1.8.4
blueocean:1.8.4
bouncycastle-api:2.17
branch-api:2.0.20
build-timeout:1.19
cloudbees-bitbucket-branch-source:2.2.12
cloudbees-folder:6.6
command-launcher:1.2
config-file-provider:3.2
credentials-binding:1.16
credentials:2.1.18
display-url-api:2.2.0
docker-commons:1.13
docker-workflow:1.17
durable-task:1.26
email-ext:2.63
favorite:2.3.2
git-client:2.7.3
git-server:1.7
git:3.9.1
github-api:1.92
github-branch-source:2.4.0
github:1.29.2
handlebars:1.1.1
handy-uri-templates-2-api:2.1.6-1.0
htmlpublisher:1.17
jackson2-api:2.8.11.3
jdk-tool:1.1
jenkins-design-language:1.8.4
jira:3.0.2
jquery-detached:1.2.1
jsch:0.1.54.2
junit:1.26.1
lockable-resources:2.3
mailer:1.21
matrix-auth:2.3
matrix-project:1.13
mercurial:2.4
momentjs:1.1.1
nodejs:1.2.6
pipeline-build-step:2.7
pipeline-graph-analysis:1.7
pipeline-input-step:2.8
pipeline-milestone-step:1.3.1
pipeline-model-api:1.3.2
pipeline-model-declarative-agent:1.1.1
pipeline-model-definition:1.3.2
pipeline-model-extensions:1.3.2
pipeline-rest-api:2.10
pipeline-stage-step:2.3
pipeline-stage-tags-metadata:1.3.2
pipeline-stage-view:2.10
plain-credentials:1.4
pubsub-light:1.12
resource-disposer:0.12
scm-api:2.2.8
script-security:1.46
sse-gateway:1.16
ssh-credentials:1.14
structs:1.16
timestamper:1.8.10
token-macro:2.5
variant:1.1
workflow-aggregator:2.6
workflow-api:2.29
workflow-basic-steps:2.11
workflow-cps-global-lib:2.12
workflow-cps:2.57
workflow-durable-task-step:2.22
workflow-job:2.25
workflow-multibranch:2.20
workflow-scm-step:2.7
workflow-step-api:2.16
workflow-support:2.20
ws-cleanup:0.34
#!/bin/bash
docker pull jenkins/jenkins:lts
docker build -t vdem/jenkins https://gist.github.com/b07c900ce0aa99eac3e77de8b0d224f0.git
docker stop jenkins
docker rm jenkins
docker run -d -v /opt/jenkins:/var/jenkins_home -p 8080:8080 -p 50000:50000 --name jenkins --restart unless-stopped vdem/jenkins:latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment