Run the Jenkins service using the Jenkins docker Image

Source: Internet
Author: User
Tags arch linux jenkins docker

Use docker technology to manage Jenkins servers. This avoids repeated installation for multiple deployments and facilitates migration to new servers.


Jenkins docker Image


Official Jenkins docker Image


Pull image:

Docker pull Jenkins



docker run --name myjenkins -p 8080:8080 -p 50000:50000 -v /var/jenkins_home jenkins


Install docker Client



Installation command:

Update the package index and add a software package that uses HTTPS transmission and a CA certificate.

$ sudo apt-get update$ sudo apt-get install apt-transport-https ca-certificates

Add the GPG key of the official docker software source (verify the validity of the downloaded software package ).

$ sudo apt-key adv --keyserver hkp:// --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

Tosource.listThe following table lists the apt sources for different Ubuntu and Debian versions.

Operating system version Repo
Precise 12.04 (LTs) deb ubuntu-precise main
Trustash 14.04 (LTs) deb ubuntu-trusty main
Xenial 16.04 (lsts) deb ubuntu-xenial main
Debian 7 wheezy deb debian-wheezy main
Debian 8 Jessie deb debian-jessie main
Debian stretch/Sid deb debian-stretch main

Use the following command to add the apt sourcesource.list(Replace<REPO>):

$ echo "<REPO>" | sudo tee /etc/apt/sources.list.d/docker.list

Update the cache of the apt software package.

$ sudo apt-get update

After everything is ready, you can install the latest docker version. The package name isdocker-engine.

$ sudo apt-get install docker-engine

If the old version of docker (lxc-docker,, Will prompt whether to delete first, select YES.


Set domestic image sources

Docker pull Jenkins is used to find that the running speed is very slow.

Switch the image source to the domestic address.


Linux curl -sSL | sh -s

This script can add -- registry-mirror to your docker configuration file/etc/docker/daemon. JSON. It is applicable to ubuntu14.04, Debian, centos6, centos7, fedora, arch Linux, and opensuse leap 42.1. Other versions may be slightly different. For more details, see the document.


Running Effect


docker run --name myjenkins -p 8080:8080 -p 50000:50000 -v /var/jenkins_home jenkins



Visit the Jenkins Website:


Docker is so easy.

Run the Jenkins service using the Jenkins docker Image

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.