Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to deploy jenkins in a docker container

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article describes in detail the corresponding analysis and solutions to the problem of how to deploy jenkins in the docker container, hoping to help more partners who want to solve this problem to find a simpler and easier way.

1. Pull the image:

Docker pull jenkinsci/blueocean

two。 Create a local data volume:

Mkdir-p / data/jenkins_home/

3. Add permissions (important, otherwise exit all the time after startup)

Chmod-R 777 / data/jenkins_home/

4. Create a container

Docker run-d-- name myjenkins-p 8040 data/jenkins_home/:/var/jenkins_home jenkinsci/blueocean 8080-p 50000 data/jenkins_home/:/var/jenkins_home jenkinsci/blueocean 50000-v

5. Description:

The-d flag is to let the docker container run in the background

-- name defines the name of a container. If it is not specified, a random number string is automatically generated as UUID.

-p 8040 8080 port mapping, my local 8080 is occupied, so I randomly map a 8040

-p 50000VR 50000 Port Mappin

-v / data/jenkins_home:/var/jenkins_home

Bind a data volume, / data/jenkins_home is the local data volume you just created

Jenkinsci/blueocean image name

This is the answer to the question about how to deploy jenkins in the docker container. I hope the above content can be of some help to you. If you still have a lot of questions to solve, you can follow the industry information channel for more related knowledge.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report