How to Use Docker Compose With Jenkins

preview_player
Показать описание
Need help with your Jenkins questions?

Timecodes ⏱:

00:00 Introduction
00:06 Overview
00:32 Starting point
00:44 Create a GitHub repository
01:14 Create a Jenkinsfile
02:46 Create pipeline job
03:47 Add Docker Compose file
04:13 Update Jenkinsfile
07:07 Run the job again
08:09 Why would you want to run Docker Compose using Jenkins?

#jenkinstutorial #dockercompose

Information referenced in this video:

Sample repository

Jenkins LTS 2.319.3

CloudBees on Twitter:

Darin on Twitter:
Рекомендации по теме
Комментарии
Автор

a intro with less than 5 secods, this deserve an oscar, straight to the point

bacteria
Автор

Thanks god! You save my life. The one and only issue i had was docker compose (v2) was not existing in Jenkins. For that i search a solution, actually i install it manually.

burhanilayda
Автор

Thanks Darin ! As I was asked to u in 2 weeks ago related this ....

RaviSharma-vwpy
Автор

Another thing I would probably add is to remove the network created by docker-compose before the test and after the test. Also it’s better to hard code the network number instead of let it float. I encounter an issue where the dynamic network docker-compose created duplicated and masked a real network to the npm registry so the test will randomly fail depending how many times the docket-compose has been used on that agent

tonychia
Автор

This runs on the built in node which isnt recommended. The challenge with this is using these in docker build agents, essentially docker in docker, like some comments here suggest. Is there a video or any resource cloudbees can provide for this?

thecoasterfollower
Автор

Any idea how to get the Docker daemon running on my Jenkins instances?

oholdeno
Автор

apart from this helpful video, I liked your keyboard's crispy sound. Can I know what keyboard you used here?

shashwatpathak
Автор

Hi sir, I'm very new to Docker as well as Jenkins, your video helped me alot.
Till now everything is clear, but I'm a bit confused,
How can we actually deploy these Docker containers (which was included in the docker-compose stack)
automatically to dev or production server remotely.

like:
Transfering the code
running docker-compose up

and what if the docker-compose file also has bind volume mounts?

I'm very confused, how can I do these things :(

If possible please make a video on this, or suggest some resources from where I can learn.

Thank you so much sir :)

aniket-in
Автор

Hi, thanks for sharing.

In fact, that's what I am trying to solve : How to properly execute docker and docker-compose commands, inside a Jenkins already running in docker container !

It is not obvious here if Jenkins is running in docker container or just installed on host...
Could you explain how you set the "linux based agent running docker + compose v2 " ??

Thanks

mounirhabsaoui
Автор

how do i add docker compose though? When i run "docker compose version" i get an error saying "compose is not a valid docker command".
If i try "docker-compose version" i get "docker-compose: command not found".
When i run "docker version" I don't see the docker compose plugin in only see buildx

Client:
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc., 0.0.0+unknown)

lindaamp
Автор

hello
what if i'm running jenkins inside docker container? how can i access docker-compose?

dukex
Автор

I am getting curl: (7) Failed to connect to localhost port 3000: Connection refused
Did anyone get this?

zaradava
Автор

Hello everyone,

I have this issue docker: not found
because docker CLI is not installed by default.

Who know how to add docker CLI for Jenkins
Plugin or code thanks

I'll apprecied

moneyismygame