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 :: powershell script run 
Shell :: git flow sourcetree command 
Shell :: how to update kali linux 2022 
Shell :: how to git clone a branch github 
Shell :: download git branch 
Shell :: install vs code on ubuntu 
Shell :: mkdir command 
Shell :: install visual studio code ubuntu using command line 
Shell :: kills a process on port 
Shell :: sitecore powershell repo 
Shell :: openssl generate passwort terminal 
Shell :: termux comandos hack apk 
Shell :: installing kubernetes on ubuntu 20.04 
Shell :: add kdiff3 to git 
Shell :: files 644 folders 755 
Shell :: ubuntu stop jira service 
Shell :: ERROR: Repository not found. fatal: Konnte nicht vom Remote-Repository lesen. Bitte stellen Sie sicher, dass die korrekten Zugriffsberechtigungen bestehen und das Repository existiert. 
Shell :: windows add to path 
Shell :: time machine logs 
Shell :: kali nethunter linux install auf windows 
Shell :: take screenshot linux 
Shell :: how to compare differences between two files in linux 
Shell :: sudo show asterisks 
Shell :: sudo: gitlab-runner: command not found 
Shell :: push to a new remote branch 
Shell :: purge opencv ubuntu 20.04 
Shell :: ubuntu 16 lock from terminal 
Shell :: debian install ab 
Shell :: close sessin git cli 
Shell :: cant install pyscopg2 win? 
ADD CONTENT
Topic
Content
Source link
Name
1+8 =