DWQA QuestionsCategory: Development ToolWhat are the benefits of Jenkins in docker
sis31 asked 3 weeks ago

After reading several articles on continuous integration of docker and Jenkins, it is found that a Jenkins is started in docker
It’s very complicated to throw Jenkins into docker, and it doesn’t have any advantages. Why do you do this?

6 Answers
Feng_Yu answered 3 weeks ago

I used to put Jenkins in docker before, but later I found that it was extremely troublesome. Because docker is suitable for applications with light dependence, applications such as Jenkins with heavy dependence are not suitable for docker at all

Whoa answered 3 weeks ago

According to the situation of the subject, docker does not play a very important role and can be freely selected

  • Use the package manager or install it manually. reference resourceshttps://jenkins.io/doc/book/g…
  • Use docker. implementdocker run -p 8080:8080 -p 50000:50000 jenkins/jenkins:lts

One more word:
Container technology mainly allows each process in the operating system to enjoy the treatment of “exclusive operating system resources”. In this way, the deployment does not need to consider the environment differences, and uses a unified way to do resource mapping (PS: IP & port, file system are all resources). Docker is based on this, which is equivalent to packaging the running environment and the software itself together, copying and replacing everywhere can complete the installation and upgrade process, as if the operating system image is general, but it is lighter n times and stronger n square times.
The above is docker in my eyes. It’s too tempting for countless software people who need to develop and maintain 7 * 24-hour operation. Even if the number of machines is small, I don’t want to fiddle with it.
Back to the specific problem:

>1. It's very complicated to throw Jenkins into docker
Yes, it's hard to operate unfamiliar things. Powerful tools have some side effects - complex, but docker controls them well.

>2. It doesn't feel good either
 In your scenario, yes. But those who toss around the server-side software running 7 * 24 hours have different opinions.

>3. Why do you do this?
Maybe it's just because the writers of the articles can use them easily. You don't have to copy it. It's the same with package manager.
sealyun answered 3 weeks ago

If it’s a container based CI / CD, don’t use Jenkins. Use thishttps://github.com/drone/droneIt’s not difficult to make a powerful thing, but a powerful and simple one.

xialeistudio answered 3 weeks ago

A machine is nothing.
It is convenient for cluster deployment. If you need to deploy the docker image
Just open a container to start the image. There is no configuration

sis31 replied 3 weeks ago

It doesn’t feel like putting Jenkins in the docker. The configuration of the plug-in downloaded by Jenkins is still on the host computer. If another machine pulls the Jenkins image, it still needs to re download the plug-in and configure it. Moreover, what does Jenkins need to do in the cluster?

junneyang answered 3 weeks ago

Java application in docker itself is not very meaningful, especially for applications like Jenkins which can be started easily
Java already has the core features of docker (container, resource limitation, etc.)
However, docker is cross language and a more elegant solution. It is also a good idea to put it in docker for unified management

Small stones in Huaxi replied 3 weeks ago


komojo answered 3 weeks ago

I really can’t think of it. After integrating numerous plug-ins and configurations, does Jenkins really need to be in the container? Does he want to be a cluster? Or for what? Who can tell me I feel weird