Skip to content

Instantly share code, notes, and snippets.

@kaosf
Last active February 3, 2023 15:01
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kaosf/d4fe05af573254484ecbe64f1216a714 to your computer and use it in GitHub Desktop.
Save kaosf/d4fe05af573254484ecbe64f1216a714 to your computer and use it in GitHub Desktop.
Docker on Jenkins on Docker
FROM jenkins/jenkins:lts-jdk11
USER root
RUN VERSION=20.10.22 && \
curl -fsSLO https://download.docker.com/linux/static/stable/x86_64/docker-${VERSION}.tgz && \
tar xf docker-${VERSION}.tgz && \
mv docker/docker /usr/local/bin && \
rm -r docker docker-${VERSION}.tgz
USER jenkins
# ref. https://stackoverflow.com/a/43594065/1006253
# ref. binary file https://download.docker.com/linux/static/stable/x86_64/
# ref. USER switch https://github.com/jenkinsci/docker/blob/master/README.md#installing-more-tools
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment