Lazy loaded image
Lazy loaded imageDeploy Jenkins with Docker
Words 442Read Time 2 min
Jun 4, 2025
Jun 4, 2025
type
status
date
slug
summary
tags
category
icon
password
🚧
Jenkins is open source tools to continuous integration and continuous deployment (CICD) helping developer to automate parts of the software deployment process. And Jenkins have ton of plugin and big community.
 

📝 Deploy Jenkins with Docker

Requirement minimum to deploy (small jobs/task):
Resource
Requirement
CPU
1 core
RAM
1–2 GB (absolute minimum)
Disk
10 GB (SSD preferred)
OS
Linux (Ubuntu/Debian/CentOS), Windows, macOS
And you need docker, if you are not install docker yet run this
to install docker in Windows you can use https://www.docker.com/products/docker-desktop/
 
Then to run docker without sudo, add docker to your groups user.
then relog user with
and you are ready to deploy Jenkins in your linux server.
to make easy to manage i am suggest to make new directory for jenkins, in this guide i am use directory name jenkins-test
then create file docker-compose.yaml run nano to create new file
copy paste this code and save with ctrl+x
answer with y to save changes
notion image
then run the docker-compose.yaml make sure you are in same directory with files
notion image
after success installation you can access jenkins from your local, example localhost:8090 or you can check the ip of vm with ip a. maybe you will get diffrent ip. In my case i can ping both of ip 192.168.247.129 or 192.168.81.128
notion image
make sure ip can ping from your OS (windows/linux). Then access jenkins from your browser
notion image
to get password you can run this command
example
notion image
use suggested plugin first
notion image
then wait process first setup jenkins
notion image
then fill with any username you want to access jenkins
notion image
use default ip if runing on local
notion image
your jenkins ready to sail

📝 Your First Job

notion image
In this Jenkins I am want test to run docker command, to confirm if its can run docker command or not.
 
Click create job
notion image
create name and use pipeline
notion image
scroll down and write into Pipeline script
notion image
save it and run with trigger button build now
notion image
then its will show job build in below here
notion image
check console output to get view of running pipeline script
notion image
from there its will showing cross mark as failed job and check mark for success job
notion image
from here the docker version showing result success, if fail to run example
notion image
and here we are, your jenkins is ready to use
 
上一篇
Docker Compose
下一篇
Vault Secret Centralized