Skip to content

den-by/jenkins-docker-in-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Installation

  1. Install Git

  2. copy use git

    git clone https://github.com/DenisBuyakov/jenkins-docker-in-docker.git
    cd jenkins-docker-in-docker/
  3. Install Docker
    (ubuntu option)Install for ubuntu

    sudo ./install-docker
    sudo systemctl status docker
  4. install jenkins (optional local) use docker env

    cd docker
    cp .env.template .env
    sudo docker-compose up -d

    Usual Access URL: http://{host-address-here}:8082 root password for jenkins in file docker/jenkins-data/secrets/initialAdminPassword
    you can use command

    sudo docker exec jenkins-blueocean cat /var/jenkins_home/secrets/initialAdminPassword
  5. install "docker" plugin and "Docker Pipeline"

  6. (aws ubuntu option)swap enable

    sudo dd if=/dev/zero of=/swapfile bs=128M count=16
    sudo chmod 600 /swapfile
    sudo mkswap /swapfile
    sudo swapon /swapfile
    sudo swapon -s
    sudo nano /etc/fstab
    sudo awk ... /etc/fstab > /tmp/$$
    sudo cat /tmp/$$ > /etc/fstab
    sudo rm /tmp/$$

    Add the following new line at the end of the file, save the file, and then exit:

    /swapfile swap swap defaults 0 0
  7. go to "Manage Nodes and Clouds" and then "Configure Clouds" and then "Add a new cloud" and then select the "docker" type from the drop-down list.

    Docker Cloud details: docker host url - tcp://docker:2376 we need to set up the Server Credentials

    X.509 Client Certificate

    Client Key. Client Certificate. Server CA Certificate. from /certs directory you can use command

    sudo docker exec jenkins-docker cat /certs/client/key.pem
    sudo docker exec jenkins-docker cat /certs/client/cert.pem
    sudo docker exec jenkins-docker cat /certs/server/ca.pem
    
    sudo docker exec jenkins-blueocean cat /certs/client/key.pem
    sudo docker exec jenkins-blueocean cat /certs/client/cert.pem
    sudo docker exec jenkins-docker-in-docker cat /certs/server/ca.pem

    checkbox enabled

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published