Sign inSign up

gagandeep39/jenkins-docker

By gagandeep39

•Updated over 6 years ago

A jenkins image that contains docker Installed in it

Image
1

134

gagandeep39/jenkins-docker repository overview

⁠Jenkins Container with docker i

  • It is a jenkins image with docker container installed inside it

  • It allows building and deploying of Docker images in the same server

  • Run the Docker Image docker run -p 8080:8080 -p 50000:50000 -v my_jenkins_workspace:/var/jenkins_home -v /var/run/docker.sock:/var/run/docker.sock -d --name my-jenkins-container <container_id>

    • -d Run the container in detached mode (backgroud)
    • -p Used to map ports i.e host_port:container_port
    • -v Expose volume
    • -v test:/var/jenkins_home Persists content of jenkins_home to a local machine folder test
    • -v /var/run/docker.sock:/var/run/docker.sock Provides access to docker from inside jenkins
  • Enter the URL in browser host_ip:8080 to access Jenkins

NOTE Initial Login requires a default password which can be fetched in the following manner

  1. Access the container in commandline docker exec -it <container_id> /bin/bash
  2. Execute cat /var/jenkins_home/secrets/initialAdminPassword
  3. Copy the output and paste it in password field

Tag summary

Content type

Image

Digest

Size

329.4 MB

Last updated

over 6 years ago

docker pull gagandeep39/jenkins-docker:2.0