Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

run jenkins docker

docker run 
--name jenkins 
-p 8080:8080 
-p 50000:50000 
-v jenkins_home:/var/jenkins_home 
-d 
-v /var/run/docker.sock:/var/run/docker.sock 
-v $(which docker):/usr/bin/docker 
jenkins/jenkins:jdk17-preview 
Comment

docker jenkins

# Get the Jenkins Docker Image and Jenkins is now running on port 8080
docker run -d -v jenkins_home:/var/jenkins_home -p 8080:8080 -p 50000:50000 --restart=on-failure jenkins/jenkins:lts-jdk11

# You'll need the admin password 
docker ps -a # copy the container_id 
docker exec -it {container_id} /bin/bash
cat /var/jenkins_home/secrets/initialAdminPassword
Comment

docker jenkins

docker run -d -v jenkins_home:/var/jenkins_home -p 8080:8080 -p 50000:50000 jenkins/jenkins:lts-jdk11
Comment

run Jenkins docker image

docker run -p 8080:8080 -p 50000:50000 -v ~/jenkins_home:/var/jenkins_home jenkins/jenkins:lts
Comment

jenkins as docker container

docker run --name jenkins-docker --rm --detach 
  --privileged --network jenkins --network-alias docker 
  --env DOCKER_TLS_CERTDIR=/certs 
  --volume jenkins-docker-certs:/certs/client 
  --volume jenkins-data:/var/jenkins_home 
  --publish 2376:2376 
  docker:dind --storage-driver overlay2
Comment

jenkinsfile docker

pipeline {
    agent { label 'master' }
    stages {
        stage('build') {
            steps {
                script {
                    def disk_size = sh(script: "df / --output=avail | tail -1", returnStdout: true).trim() as Integer
                    println("disk_size = ${disk_size}")
                }
            }
        }
    }
}
Comment

jenkins download docker

docker run 
  --name jenkins-docker (1)
  --rm (2)
  --detach (3)
  --privileged (4)
  --network jenkins (5)
  --network-alias docker (6)
  --env DOCKER_TLS_CERTDIR=/certs (7)
  --volume jenkins-docker-certs:/certs/client (8)
  --volume jenkins-data:/var/jenkins_home (9)
  --publish 2376:2376 (10)
  docker:dind (11)
  --storage-driver overlay2(12)
Comment

PREVIOUS NEXT
Code Example
Shell :: how to make directories in linux 
Shell :: command to install any package using Pip 
Shell :: letsencrypt 
Shell :: creating new branch 
Shell :: ubuntu enable network manager 
Shell :: get date windows batch 
Shell :: git fork 
Shell :: ghost in the shell full movie 
Shell :: dos dir to text file 
Shell :: GIT: List all currently configured remotes 
Shell :: How to delete files in linxu terminal 
Shell :: batch script comment 
Shell :: arch linux wine 
Shell :: tinymce vue 3 
Shell :: htop ubuntu installation command 
Shell :: mac terminal screenshot 
Shell :: bash compare two strings 
Shell :: npm install firebase @angular/fire 
Shell :: add user linux 
Shell :: how to uninstall from /var to increase its size 
Shell :: get total hdd space linux 
Shell :: cmd print Path pretty 
Shell :: gunicorn gevent websocket 
Shell :: powershell download file from api url 
Shell :: git debug 
Shell :: agregar sudoers a user centos 7 
Shell :: login authentication in android using volley github 
Shell :: install espanso debian linux without snap 
Shell :: create a tag locally 
Shell :: how to compile semaphore.h in terminal 
ADD CONTENT
Topic
Content
Source link
Name
6+7 =