Dockerfile based agents was the biggest game changer for Jenkins for me.
@mithuntechtraining
Жыл бұрын
Hi Darin You and your videos are awesome and very informative as always. But could you please make a video on how to use docker as dynamic slave agents by building a custom docker image and use that whenever there is requirement in the job. Thanks Mithun
@basamnath2883
2 ай бұрын
Amazing teaching. Just awesome and thank you
@vinaykumar-qq9wq
10 ай бұрын
Excellent narrative style. Really appreciate your efforts ❤
@kimwkahler7381
Жыл бұрын
Great video! Automated deployment on a box that only exists while Jenkins is building. Surreal :)
@sebastianfarias5670
2 жыл бұрын
OMG best video ever ! thank you !!!
@N1mdae
2 жыл бұрын
This seems fantastic. One question : If we have Jenkins running as a docker image. Is there any problem or consideration with the setup?
@RaviSharma-vw7py
2 жыл бұрын
Thanks Darin ! Nice !
@azaifel
2 жыл бұрын
Excellent tutorial! thanks
@pazfelipe
3 жыл бұрын
Hi Darin. Could you make a video showing how to execute these steps inside a jenkins docker image?
@AndreSantos-hd7iw
2 жыл бұрын
You need to run jenkins container mapping volume to docker socket. That way the docker commands executed inside the container will be executed on the host. --volume /var/run/docker.sock:/var/run/docker.sock
@s.i.m.c.a
Жыл бұрын
@@AndreSantos-hd7iw but would you expose the docker.socket to the Agent? it is an security risk. For example, you would able to kill Jenkins agent from the job or any another non-relevant to the Jenkins container.
@scribblespoon1919
2 ай бұрын
Docker was not found. I'm guessing there are some other prerequisits other than the plugins. The documention of the docker pipeline plugin didn't help me as well.
@aleexdds
10 ай бұрын
Amazing Videos
@rbelatamas
2 жыл бұрын
thanks this really useful video!
@anthonywhitehead8182
3 жыл бұрын
fantastic content, thank you
@kushsharma6653
2 жыл бұрын
Thanks for this awesome video. Keep sharing more! One question: What if I want to use Jenkinsfile-3 with node image, curl and git but I also want to have docker installed on this image? What would be the dockerfile code like? Thanks in the advance. :D
@riteshwalia1295
2 жыл бұрын
HI Darin, I have my Jenkins running on docker so how do i create the docker build agents. Could you please share what additional configurations are required for that
@0kaschei0
2 жыл бұрын
Thank you
@danish6192
3 жыл бұрын
perfect !
@sambasivam
2 жыл бұрын
how does it run at agent? is there any additional config settings missing? Everytime I run it will execute in master and throw error docker not found. any help?
@miguelcastorena4293
2 ай бұрын
You need to install Docker
@bambamty
5 ай бұрын
I am trying to run ESP-IDF docker with a 'build-wrapper' inside of it to generate build files for an ESP32. When I do this Jenkins complains as it looks like my 'builder' node is running these, when it should be my Docker container. I don't want to install them on the node as then i'll be unable to swap dependencies on a per-project basis. Any help is greatly appreciated!
@digitallova
Жыл бұрын
what about slave nodes on the cloud? what kind of directives to put to execute a docker agent in a node on the cloud?
@אופקגולדשטיין-ר2ס
3 ай бұрын
How did you install docker cli on the agent?
@BryanIngking-k2x
7 ай бұрын
Hi Darren, just wondering if agent1 is running inside a docker container as I am currently seeing errors when trying to follow the guide you made in here?
@Rahul-hx9dz
5 ай бұрын
Hey how do I setup windows server which contains docker deamon running in it as agent.. so that I can run my groovy pipeline script in dynamically created container on agent ?
@anthonywhitehead8182
3 жыл бұрын
Hi Darin, I've been following your examples, thank you. I'm not sure if you answer questions here, but I've got a docker-compose setup with nginx and the blueocean jenkins container (created from ansible) working nicely, along with configuration as code. I'm trying to create a build agent but am stuck with and haven't been able to resolve 'got permission denied while trying to connect to the docker daemon socket'. I'd like the agent to be another docker container in docker-compose based on the inbound-agent container. Am I going around this ok, or should I just give in and create a real vm as an agent rather than a docker one?
@sumanta8504
2 жыл бұрын
if you are getting 'got permission denied while trying to connect to the Docker daemon socket' that means Jenkins user does not have the access permission. So in that case add jenkins user in docker group, hope that will resolve the issue
@JayeshRaina-b8m
Жыл бұрын
How can I stop in remoivng the containers in pipline, there is no code to make sure container remains after job is finished.
@backendjava
2 ай бұрын
teach how to do it with a docker based jenkins install
@Adventurevictoria
Жыл бұрын
You have been told that the agent has been installed docker but actually, the agent was running out side of docker as you can see from 5:45 . Im spend over week to find a solution to create docker agent that actually running in side docker and still doing all docker command job include docker compose , currently I was able to run successfully docker command in side docker agent which is running in side docker and build as well but not able to RUN!!!!!! anyone who made it ?????
@lalitshukla6585
2 жыл бұрын
Thanks Sir.. Can we use a Jenkins upstream job to create multiple slaves ? if yes please explain.
@staj
Жыл бұрын
Brilliantly done. Great Information. Thanks.
@sathishsubramanian2510
2 жыл бұрын
Hi Darin, I have a doubt that for building docker image should we need to run jenkins inisde docker container or from war file we can use jenkins?
@StevePrior
2 жыл бұрын
I thought this was a very helpful video, but have a concern about the second example which I found out the hard way. When you have two different agents in play Jenkins creates separate workspaces for each, so any files created by the first maven agent won't be available to the second agent. In my case I had a build stage that used a containerized build tool and I wanted the artifact created by that tool to be available to a second stage which was not running in the docker container. So I ended up using agent any at the toplevel, then specified reuseNode true within the agent of the first stage (which runs the docker container), then no agent specified for the second stage. This resulted in an overall agent workspace for the pipeline, but then the first stage running in a docker container but not creating a new workspace to do so, so the next stage would still be using the same workspace. I'm sure I still have lots of tricks to learn, but it would be great if CloudBees produced a video on this.
@s.i.m.c.a
Жыл бұрын
it's an Jenkins basics - the stages could be executed on a different agents, and you could instruct Jenkins to do it in a parallel.
@Sathurjan11
10 ай бұрын
Still waiting to schedule task Waiting for next available executor
@yashhirulkar909
2 жыл бұрын
sir i am getting this error while using docker as agent .What shud i do please? failed to register layer: Error processing tar file(exit status 1): open /etc/rdma/modules/roce.conf: no space left on device
@rohanrustagi7857
Жыл бұрын
hey can I add docker build stage in the same pipeline ?
@nandiniachugatla932
7 ай бұрын
How can we add docker in jenkins image ??
@master2466
2 жыл бұрын
What if the docker host is out there on network as opposed to on Jenkins host?
@vijjisanthi1922
2 жыл бұрын
Hello Darin currently iam running jenkins from ec2 is there any possibility to move from ec2 to ecs without loosing my data and configuration
2 жыл бұрын
how can use this with docker daemon with remote docker ?
@RajaAnbazhagan
Жыл бұрын
Aha. This one uses the local docker on the available agent to run the stuff. Was confusing it with docker cloud agents themselves.
@thecoasterfollower3564
Жыл бұрын
How can we run docker commands on the docker cloud agents? All these tutorials including his do it on the built in node which isn’t recommended
@connerwhite5351
Жыл бұрын
docker: not found
@weilin4872
5 ай бұрын
The same bro, 🤣
@kayoutube690
4 ай бұрын
These the docker build is not work for this tutorial.
@thecoasterfollower3564
Жыл бұрын
But these all run on the built in node? Isnt the point of docker agents to use it on a docker cloud node? And you can't even run docker commands in any of these, where alot of apps are ran on docker in the first place. I don't understand how this is any different from just using docker cloud nodes. I need to run docker inside of the docker cloud nodes themselves, this video is misleading because you still are building on the built in node.
@abhijitshubham9730
Жыл бұрын
Hi @thecoasterfollower3564, were you able to find the solution as to how I can use a Dockerfile to create Docker container as node and then build docker image inside it?
@irfansadiq
2 жыл бұрын
Will it pick any agent wit label Linux?
@sambasivam
2 жыл бұрын
how does it know when it is not specified in the Jenkinsfile?
@rayc6556
2 жыл бұрын
i am using image jenkins/jenkins:lts-jdk11, and the pipeline gave me error docker: not found. Anyone have the same experience and how to solve?
@shilashm5691
2 жыл бұрын
You are not alone😪
@shilashm5691
2 жыл бұрын
Do you got any solution?
@AndreSantos-hd7iw
2 жыл бұрын
You must create a custom image based on jenkins/jenkins:lts-jdk11 and install docker on it
@AndreSantos-hd7iw
2 жыл бұрын
And run jenkins container mapping volume to docker socket. That way the docker commands executed inside the container will be executed on the host. --volume /var/run/docker.sock:/var/run/docker.sock
@s.i.m.c.a
Жыл бұрын
it's an docker-in-docker concept and before implementing it, you should weight the risks like - all jobs and containers, including the one belongs to agent would be exposed to the user pipeline. Basically user with his own pipeline would be able to manipulate any another user pipeline and shut down the agent itself. This stuff could be used only in non-critical environment or in a lab. If it is used in production - get ready to be hacked (especially if there are a different level access to different pipelines)
@vijjisanthi1922
2 жыл бұрын
Can u pls help out me on this
@andreeliasoliveira6131
Жыл бұрын
Honestly if it weren't for Darin's videos Jenkins would be unusable
@girishananda8604
3 жыл бұрын
Sucks! Just polluting internet with lack of info.
@Hakob771
2 жыл бұрын
Here is the issue, who can help? I tried agent { dockerfile true }, Jenkins was creating docker container, after that it didn't go through stages, i mean it stuck after creating docker container, job is not ending, minutes are going, but content in steps block dont' work
@shantanuparanjpe8363
2 жыл бұрын
Hi Darin, i am trying to run the jenkins pipeline stages inside a docker agent. I am using the centos-8 on my host machine. I am getting below error while running the build java.io.IOException: Failed to run top 'fab543e3693ea5258e92d440b2e043d58aaf09c98e25f19e1d85c416ea5f4c93'. Error: Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg. Error: top can only be used on running containers Jenkinsfile: pipeline { environment { DOCKERHUB_CREDENTIALS = credentials('dockerhub') } agent { docker { image 'ubuntu:latest' alwaysPull true } } stages { stage('Build') { environment { HOME="." } steps { script { sh '/usr/local/bin/docker build -t test .' } } } stage('Login') { steps { sh 'echo $DOCKERHUB_CREDENTIALS_PSW |/usr/local/bin/docker login -u $DOCKERHUB_CREDENTIALS_USR --password-stdin' } } stage('Push') { steps { script { sh '/usr/local/bin/docker push *****/test' } } } } }
@TheExplorist
Жыл бұрын
+ docker inspect -f . node:18.16.0-alpine Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? facing even docker desktop everything running and I can build the image from my local computer as well
@yukinoryu
4 күн бұрын
if used brew, install docker via brew cask , so run: brew install --cask docker
Пікірлер: 68