Docker 安装 Jenkins


sudo apt install
sudo service docker start
sudo docker login
#Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to to create one.
#Username: cheenwe
#Login Succeeded

sudo docker pull jenkins/jenkins:lts


sudo docker run -p 8001:8001  -v jenkins_home:/tmp/jenkins jenkins/jenkins:lts

New install docker

sudo apt-get remove docker docker-engine
sudo rm -rf /var/lib/docker/

sudo apt-get update

curl -fsSL | sudo apt-key add -

sudo apt-key fingerprint 0EBFCD88

sudo add-apt-repository \
   "deb [arch=amd64] \
   $(lsb_release -cs) \

sudo apt-get update

sudo apt-get install docker-ce

# or select version
# apt-cache madison docker-ce
# sudo apt-get install docker-ce=<VERSION>

docker -v

New uninstall docker

sudo apt-get purge docker-ce
sudo rm -rf /var/lib/docker

ubuntu install jenkins

This is the Debian package repository of Jenkins to automate installation and upgrade. To use this repository, first add the key to your system:

wget -q -O - sudo apt-key add -

Then add the following entry in your /etc/apt/sources.list:

deb binary/

Update your local package index, then finally install Jenkins:

sudo apt-get update sudo apt-get install jenkins


nano /etc/init.d/jenkins nano /etc/default/jenkins