{"id":43136,"date":"2017-01-18T11:00:54","date_gmt":"2017-01-18T09:00:54","guid":{"rendered":"http:\/\/examples.javacodegeeks.com\/?p=43136"},"modified":"2019-03-29T14:10:22","modified_gmt":"2019-03-29T12:10:22","slug":"jenkins-docker-image-example","status":"publish","type":"post","link":"https:\/\/examples.javacodegeeks.com\/devops\/docker\/jenkins-docker-image-example\/","title":{"rendered":"Jenkins Docker Image Example"},"content":{"rendered":"<h2>1. Introduction<\/h2>\n<p>In this post we will learn about how to install and configure Jenkins through the Jenkins Docker image. This is the official Docker image of Jenkins available from the Docker hub <a href=\"https:\/\/hub.docker.com\/_\/jenkins\/\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>. Please ensure that you have <a href=\"https:\/\/docs.docker.com\/engine\/installation\/linux\/ubuntulinux\/\" target=\"_blank\" rel=\"noopener noreferrer\">Docker engine<\/a> and <a href=\"https:\/\/docs.docker.com\/compose\/install\/\" target=\"_blank\" rel=\"noopener noreferrer\">Docker-Compose<\/a> installed to try out the examples provided in this post.<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;\n<\/p>\n<h2>2. Install Jenkins Docker Image<\/h2>\n<p>The official Jenkins Docker image can be found <a href=\"https:\/\/hub.docker.com\/_\/jenkins\/\">here<\/a>. It is installed in the standard way of pulling any Docker image.<\/p>\n<pre class=\"brush:bash\">$ docker pull jenkins\nUsing default tag: latest\nlatest: Pulling from library\/jenkins\n\n75a822cd7888: Pull complete \n57de64c72267: Pull complete \n4306be1e8943: Pull complete \n1e6944bfb718: Pull complete \n3521f2f45ed2: Pull complete \n9c2f0d9b5f90: Pull complete \n8cedcf6d2527: Pull complete \n31f99da7583d: Pull complete \n2b1a4e887f7e: Pull complete \nec60c180ba47: Pull complete \nb8c5058508d7: Pull complete \nd5f5f89b9fbc: Pull complete \n9d9de1ae7cbb: Pull complete \nb9281b89f5bb: Pull complete \nb2b525bc7c36: Pull complete \n7ba52a961890: Pull complete \n1902c30f8508: Pull complete \n87e732b3b721: Pull complete \n4fae69e3ea03: Pull complete \nDigest: sha256:a71f0957979d360c80c1be258e9f5bb0de66a27ae072c4d1e49f569fc83538a9\nStatus: Downloaded newer image for jenkins:latest\n$\n$ docker images\nREPOSITORY          TAG                 IMAGE ID            CREATED             SIZE\njenkins             latest              e11ceb27c34e        2 weeks ago         714.6 MB\n<\/pre>\n<h2>3. Run Jenkins Image<\/h2>\n<p>Now that the Jenkins image is downloaded it can be stated with the <code>docker run<\/code> command like below:<\/p>\n<pre class=\"brush:bash\">$ docker run --detach --publish=49001:8080 --volume=\/home\/hariharan\/work\/jenkins_home:\/var\/jenkins_home --tty --name=\"my_jenkins_1\" jenkins\nd1c5bd67c530d67212ca2dd3f35e50366309d4f33d197120c93907b4a3d80559\n$\n$ docker ps \nCONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                                NAMES\nd1c5bd67c530        jenkins             \"\/bin\/tini -- \/usr\/lo\"   51 seconds ago      Up 50 seconds       50000\/tcp, 0.0.0.0:49001-&gt;8080\/tcp   my_jenkins_1\n<\/pre>\n<p>We started the Jenkins container called <code>my_jenkins_1<\/code> in a detached mode. Jenkins server listens on port 8080 by default, this is exposed as port 49001 on the docker host. All Jenkins data is persisted in <code>\/home\/hariharan\/work\/jenkins_home<\/code>. We can check if the server started properly using <code>docker logs<\/code><\/p>\n<pre class=\"brush:bash\">$ docker logs my_jenkins_1\nRunning from: \/usr\/share\/jenkins\/jenkins.war\nwebroot: EnvVars.masterEnvVars.get(\"JENKINS_HOME\")\n...\n...\n*************************************************************\n\nJenkins initial setup is required. An admin user has been created and a password generated.\nPlease use the following password to proceed to installation:\n\n750e3bffe30a4b959a703c1d4a6072c0\n\nThis may also be found at: \/var\/jenkins_home\/secrets\/initialAdminPassword\n\n*************************************************************\n...\n...\n<\/pre>\n<p>As you can see from above, there is a one-time password to be provided to unlock Jenkins. This means that Jenkins has started properly. Copy the password provided in the logs. You will need that for setting up Jenkins for first-time use. Let us now setup Jenkins for first-time use.<\/p>\n<p>Open <code>http:\/\/localhost:49001<\/code> in the browser. You should see the &#8220;Unlock Jenkins&#8221; screen where you should provide the unlock password from above, like so:<\/p>\n<p><figure id=\"attachment_43168\" aria-describedby=\"caption-attachment-43168\" style=\"width: 860px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/01-unlock-jenkins-1.png\"><img decoding=\"async\" class=\"size-full wp-image-43168\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/01-unlock-jenkins-1.png\" alt=\"Unlock jenkins for fist time use\" width=\"860\" height=\"403\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/01-unlock-jenkins-1.png 860w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/01-unlock-jenkins-1-300x141.png 300w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/01-unlock-jenkins-1-768x360.png 768w\" sizes=\"(max-width: 860px) 100vw, 860px\" \/><\/a><figcaption id=\"caption-attachment-43168\" class=\"wp-caption-text\">Unlock jenkins for fist time use<\/figcaption><\/figure><div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p>&nbsp;<\/p>\n<p>After entering the password to unlock Jenkins, the setup wizard takes us to the next screen to setup the plugins you need to customize your Jenkins instance.<\/p>\n<p><figure id=\"attachment_43169\" aria-describedby=\"caption-attachment-43169\" style=\"width: 860px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/02-customize-plugins-1.png\"><img decoding=\"async\" class=\"size-full wp-image-43169\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/02-customize-plugins-1.png\" alt=\"Customize Jenkins\" width=\"860\" height=\"482\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/02-customize-plugins-1.png 860w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/02-customize-plugins-1-300x168.png 300w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/02-customize-plugins-1-768x430.png 768w\" sizes=\"(max-width: 860px) 100vw, 860px\" \/><\/a><figcaption id=\"caption-attachment-43169\" class=\"wp-caption-text\">Customize Jenkins<\/figcaption><\/figure><\/p>\n<p>Let us select the option &#8220;install suggested plugins&#8221; for now.&nbsp; This leads us to the next screen where a set of pre-determined plugins are installed for you.&nbsp; This will take some time to finish.<\/p>\n<p><figure id=\"attachment_43170\" aria-describedby=\"caption-attachment-43170\" style=\"width: 860px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/03-getting-started-1.png\"><img decoding=\"async\" class=\"size-full wp-image-43170\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/03-getting-started-1.png\" alt=\"Installing pre-selected plugins\" width=\"860\" height=\"544\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/03-getting-started-1.png 860w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/03-getting-started-1-300x190.png 300w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/03-getting-started-1-768x486.png 768w\" sizes=\"(max-width: 860px) 100vw, 860px\" \/><\/a><figcaption id=\"caption-attachment-43170\" class=\"wp-caption-text\">Installing pre-selected plugins<\/figcaption><\/figure><\/p>\n<p>After this we will be taken to a screen to create the first admin user. That screen is pretty self-explanatory.&nbsp; Keep aside the username and password that you created here. We will use these credentials in chapter 3 below. Fill up the details in this below screen and click on the same button.<\/p>\n<p><figure id=\"attachment_43171\" aria-describedby=\"caption-attachment-43171\" style=\"width: 860px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/04-create-admin-user-1.png\"><img decoding=\"async\" class=\"size-full wp-image-43171\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/04-create-admin-user-1.png\" alt=\"Create first admin user\" width=\"860\" height=\"400\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/04-create-admin-user-1.png 860w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/04-create-admin-user-1-300x140.png 300w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/04-create-admin-user-1-768x357.png 768w\" sizes=\"(max-width: 860px) 100vw, 860px\" \/><\/a><figcaption id=\"caption-attachment-43171\" class=\"wp-caption-text\">Create first admin user<\/figcaption><\/figure><\/p>\n<p>This finishes Jenkins setup and you will see a final &#8220;Jenkins is ready!&#8221; screen. Click on the &#8220;Start using Jenkins&#8221; button and you are all set to start using Jenkins from it&#8217;s Docker image.<\/p>\n<p><figure id=\"attachment_43179\" aria-describedby=\"caption-attachment-43179\" style=\"width: 860px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/05-jenkins-is-ready-2.png\"><img decoding=\"async\" class=\"size-full wp-image-43179\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/05-jenkins-is-ready-2.png\" alt=\"Jenkins is ready\" width=\"860\" height=\"318\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/05-jenkins-is-ready-2.png 860w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/05-jenkins-is-ready-2-300x111.png 300w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/05-jenkins-is-ready-2-768x284.png 768w\" sizes=\"(max-width: 860px) 100vw, 860px\" \/><\/a><figcaption id=\"caption-attachment-43179\" class=\"wp-caption-text\">Jenkins is ready<\/figcaption><\/figure><\/p>\n<h2>4. Configure Jenkins Plugins Through Dockerfile<\/h2>\n<p>In the previous example we installed plugins through the browser. In this section, we will see how to configure Jenkins plugins through a Dockerfile. For this we will have to create a new Docker image derived from the official Jenkins Docker image. For this example, we will see how to configure the <a href=\"https:\/\/wiki.jenkins-ci.org\/display\/JENKINS\/NodeJS+Plugin\">nodejs Jenkins plugin<\/a> through a Dockerfile.<\/p>\n<p>Let us start with a simple Docker-compose file to setup the custom Jenkins image. Create a file called <code>docker-compose.yml<\/code>, enter the below text and save. Be careful with the tab alignment in the YAML file. Things go crazy if the lines are not properly indented and aligned like below.<\/p>\n<pre class=\"brush:bash\">version: \"2\"\nservices:\n  my-jenkins-setup:\n    build:\n      context: .\n      dockerfile: Dockerfile\n    # image: jenkins:latest\n    ports:\n      - \"49001:8080\"\n    volumes:\n      - \/home\/hariharan\/work\/jenkins_home:\/var\/jenkins_home\n<\/pre>\n<p>Above, we gave references to the Dockerfile, listed out the ports to expose and set up the Jenkins volume. Now let us setup the <code>Dockerfile<\/code>. Create a file called <code>Dockerfile<\/code> and enter the below text.<\/p>\n<pre class=\"brush:bash\">FROM jenkins:latest\n\nCOPY plugins.txt \/usr\/share\/jenkins\/plugins.txt\nRUN \/usr\/local\/bin\/plugins.sh \/usr\/share\/jenkins\/plugins.txt\n<\/pre>\n<p>Above, we configured to derive from the official Jenkins image. We copied a file called <code>plugins.txt<\/code> into <code>\/usr\/share\/jenkins<\/code> and finally invoked a script called <code>\/usr\/local\/bin\/plugins.sh<\/code> with <code>\/usr\/share\/jenkins\/plugins.sh<\/code> as input. <code>plugins.sh<\/code> is a script provided by Jenkins to install Jenkins plugins. It refers to a file that provides a list of all plugins to install. This list of plugins to install is provided in <code>plugins.txt<\/code>. Let us create <code>plugins.txt<\/code> now. Save the below text in a file called <code>plugins.txt<\/code>.[ulp id=&#8217;6PVIvOz3kDbYmNRn&#8217;]<\/p>\n<pre class=\"brush:bash\">#pluginID:version\nstructs:1.2\njunit:1.19\nbouncycastle-api:2.16.0\nwindows-slaves:1.2\nantisamy-markup-formatter:1.5\nicon-shim:2.0.3\nscript-security:1.25\ncredentials:2.1.10\ncloudbees-folder:5.16\nmatrix-auth:1.4\nmatrix-project:1.8\nnodejs:0.2.2\n<\/pre>\n<p>Essentially, we want to install only <code>nodejs<\/code> plugin. But while installing plugins through Docker we have to provide all dependencies for this plugin also. So the above list provides all plugins in the dependency tree of <code>nodejs<\/code>. The list is in the format of <code>pluginID:version<\/code> and this information for each plugin was gleaned from the <a href=\"https:\/\/plugins.jenkins.io\/\">Jenkins plugins directory online<\/a>.<\/p>\n<p>Now, save the files <code>docker-compose.yml<\/code>, <code>Dockerfile<\/code> and <code>plugins.txt<\/code> in the same folder. Next run <code>docker-compose build<\/code>.<\/p>\n<pre class=\"brush:bash\">$ docker-compose build\nBuilding my-jenkins-setup\nStep 1 : FROM jenkins:latest\n ---&gt; e11ceb27c34e\nStep 2 : MAINTAINER Hariharan Narayanan \n ---&gt; Running in ce996b865537\n ---&gt; d1f5a4528e99\nRemoving intermediate container ce996b865537\nStep 3 : COPY plugins.txt \/usr\/share\/jenkins\/plugins.txt\n ---&gt; ee5dacd49d2b\nRemoving intermediate container 343a85d2721f\nStep 4 : RUN \/usr\/local\/bin\/plugins.sh \/usr\/share\/jenkins\/plugins.txt\n ---&gt; Running in 366ca368d247\nWARN: plugins.sh is deprecated, please switch to install-plugins.sh\nAnalyzing war: \/usr\/share\/jenkins\/jenkins.war\nDownloading structs:1.2\nDownloading junit:1.19\nDownloading bouncycastle-api:2.16.0\nDownloading windows-slaves:1.2\nDownloading antisamy-markup-formatter:1.5\nDownloading icon-shim:2.0.3\nDownloading script-security:1.25\nDownloading credentials:2.1.10\nDownloading cloudbees-folder:5.16\nDownloading matrix-auth:1.4\nDownloading matrix-project:1.8\nDownloading nodejs:0.2.2\n---------------------------------------------------\nINFO: Successfully installed 12 plugins.\n---------------------------------------------------\n ---&gt; 8f35404720be\nRemoving intermediate container 366ca368d247\nSuccessfully built 8f35404720be\n$\n$ docker images\nREPOSITORY                 TAG                 IMAGE ID            CREATED             SIZE\njenkins_my-jenkins-setup   latest              8f35404720be        52 seconds ago      720.6 MB\njenkins                    latest              e11ceb27c34e        2 weeks ago         714.6 MB\nubuntu                     latest              104bec311bcd        4 weeks ago         129 MB\nalpine                     latest              baa5d63471ea        12 weeks ago        4.803 MB\n<\/pre>\n<p>The <code>docker-compose build<\/code> command created a new image called <code>jenkins_my-jenkins-setup<\/code> which contains all the Jenkins plugins listed in <code>plugins.txt<\/code>. The build process lists out all the plugins that were installed.<\/p>\n<p>Now start the new Jenkins container and open <code>http:\/\/localhost:49001<\/code> in the browser.<\/p>\n<pre class=\"brush:bash\">$ docker-compose up\nCreating jenkins_my-jenkins-setup_1\nAttaching to jenkins_my-jenkins-setup_1\nmy-jenkins-setup_1  | Running from: \/usr\/share\/jenkins\/jenkins.war\nmy-jenkins-setup_1  | webroot: EnvVars.masterEnvVars.get(\"JENKINS_HOME\")\n...\n...\nmy-jenkins-setup_1  | INFO: Jenkins is fully up and running\n...\n...\n<\/pre>\n<p>You will not be taken to the setup screen again since we reused the same volumes created in chapter 2 above. You will be asked for the username and password. Enter the same admin username and password that you created during the setup process in chapter 2. Once you are logged in, you can start using Jenkins like before but with the new plugins installed. You can verify that nodejs plugin is installed by opening the installed plugins page at <code>http:\/\/localhost:49001\/pluginManager\/installed<\/code>. Type &#8220;nodejs&#8221; in the &#8220;filter&#8221; box and you should see a box like below.<\/p>\n<p><figure id=\"attachment_43173\" aria-describedby=\"caption-attachment-43173\" style=\"width: 860px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/06-installed-plugins-1.png\"><img decoding=\"async\" class=\"size-full wp-image-43173\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/06-installed-plugins-1.png\" alt=\"Installed nodejs plugin\" width=\"860\" height=\"489\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/06-installed-plugins-1.png 860w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/06-installed-plugins-1-300x171.png 300w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/06-installed-plugins-1-768x437.png 768w\" sizes=\"(max-width: 860px) 100vw, 860px\" \/><\/a><figcaption id=\"caption-attachment-43173\" class=\"wp-caption-text\">Installed nodejs plugin<\/figcaption><\/figure><\/p>\n<h2>5. Summary<\/h2>\n<p>In this post we learnt how to install and run a Jenkins server from the official Jenkins Docker image.&nbsp; We also saw how to customize and extend the Jenkins Docker image with the Jenkins plugins we need. More details on how to use the Jenkins Docker image can be found from the <a href=\"https:\/\/hub.docker.com\/_\/jenkins\/\">Dockerhub page for Jenkins<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. Introduction In this post we will learn about how to install and configure Jenkins through the Jenkins Docker image. This is the official Docker image of Jenkins available from the Docker hub here. Please ensure that you have Docker engine and Docker-Compose installed to try out the examples provided in this post. &nbsp; &nbsp; &hellip;<\/p>\n","protected":false},"author":103,"featured_media":31013,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1354],"tags":[1635],"class_list":["post-43136","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-docker","tag-jenkins"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Jenkins Docker Image Example - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"In this post we will see the basics of using and configuring the official Jenkins Docker image\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/examples.javacodegeeks.com\/devops\/docker\/jenkins-docker-image-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Jenkins Docker Image Example - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"In this post we will see the basics of using and configuring the official Jenkins Docker image\" \/>\n<meta property=\"og:url\" content=\"https:\/\/examples.javacodegeeks.com\/devops\/docker\/jenkins-docker-image-example\/\" \/>\n<meta property=\"og:site_name\" content=\"Examples Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2017-01-18T09:00:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-03-29T12:10:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/12\/docker-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Hariharan Narayanan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Hariharan Narayanan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/devops\/docker\/jenkins-docker-image-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/devops\/docker\/jenkins-docker-image-example\/\"},\"author\":{\"name\":\"Hariharan Narayanan\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/780d96edfe3bce18c5440613fa88bce3\"},\"headline\":\"Jenkins Docker Image Example\",\"datePublished\":\"2017-01-18T09:00:54+00:00\",\"dateModified\":\"2019-03-29T12:10:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/devops\/docker\/jenkins-docker-image-example\/\"},\"wordCount\":905,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/devops\/docker\/jenkins-docker-image-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/12\/docker-logo.jpg\",\"keywords\":[\"jenkins\"],\"articleSection\":[\"Docker\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/devops\/docker\/jenkins-docker-image-example\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/devops\/docker\/jenkins-docker-image-example\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/devops\/docker\/jenkins-docker-image-example\/\",\"name\":\"Jenkins Docker Image Example - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/devops\/docker\/jenkins-docker-image-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/devops\/docker\/jenkins-docker-image-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/12\/docker-logo.jpg\",\"datePublished\":\"2017-01-18T09:00:54+00:00\",\"dateModified\":\"2019-03-29T12:10:22+00:00\",\"description\":\"In this post we will see the basics of using and configuring the official Jenkins Docker image\",\"breadcrumb\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/devops\/docker\/jenkins-docker-image-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/devops\/docker\/jenkins-docker-image-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/devops\/docker\/jenkins-docker-image-example\/#primaryimage\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/12\/docker-logo.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/12\/docker-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/devops\/docker\/jenkins-docker-image-example\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/examples.javacodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"DevOps\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/devops\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Docker\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/devops\/docker\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Jenkins Docker Image Example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Examples and Code Snippets\",\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/javacodegeeks\",\"https:\/\/x.com\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/780d96edfe3bce18c5440613fa88bce3\",\"name\":\"Hariharan Narayanan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/10\/Hariharan-Narayanan-96x96.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/10\/Hariharan-Narayanan-96x96.jpg\",\"caption\":\"Hariharan Narayanan\"},\"description\":\"Hari graduated from the School of Computer and Information Sciences in the University of Hyderabad. Over his career he has been involved in many complex projects in mobile applications, enterprise applications, distributed applications, micro-services, and other platforms and frameworks. He works as a consultant and is mainly involved with projects based on Java, C++ and Big Data technologies.\",\"sameAs\":[\"https:\/\/www.javacodegeeks.com\"],\"url\":\"https:\/\/examples.javacodegeeks.com\/author\/hariharan-narayanan\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Jenkins Docker Image Example - Java Code Geeks","description":"In this post we will see the basics of using and configuring the official Jenkins Docker image","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/examples.javacodegeeks.com\/devops\/docker\/jenkins-docker-image-example\/","og_locale":"en_US","og_type":"article","og_title":"Jenkins Docker Image Example - Java Code Geeks","og_description":"In this post we will see the basics of using and configuring the official Jenkins Docker image","og_url":"https:\/\/examples.javacodegeeks.com\/devops\/docker\/jenkins-docker-image-example\/","og_site_name":"Examples Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2017-01-18T09:00:54+00:00","article_modified_time":"2019-03-29T12:10:22+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/12\/docker-logo.jpg","type":"image\/jpeg"}],"author":"Hariharan Narayanan","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Hariharan Narayanan","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/examples.javacodegeeks.com\/devops\/docker\/jenkins-docker-image-example\/#article","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/devops\/docker\/jenkins-docker-image-example\/"},"author":{"name":"Hariharan Narayanan","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/780d96edfe3bce18c5440613fa88bce3"},"headline":"Jenkins Docker Image Example","datePublished":"2017-01-18T09:00:54+00:00","dateModified":"2019-03-29T12:10:22+00:00","mainEntityOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/devops\/docker\/jenkins-docker-image-example\/"},"wordCount":905,"commentCount":1,"publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/devops\/docker\/jenkins-docker-image-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/12\/docker-logo.jpg","keywords":["jenkins"],"articleSection":["Docker"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/examples.javacodegeeks.com\/devops\/docker\/jenkins-docker-image-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/examples.javacodegeeks.com\/devops\/docker\/jenkins-docker-image-example\/","url":"https:\/\/examples.javacodegeeks.com\/devops\/docker\/jenkins-docker-image-example\/","name":"Jenkins Docker Image Example - Java Code Geeks","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/devops\/docker\/jenkins-docker-image-example\/#primaryimage"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/devops\/docker\/jenkins-docker-image-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/12\/docker-logo.jpg","datePublished":"2017-01-18T09:00:54+00:00","dateModified":"2019-03-29T12:10:22+00:00","description":"In this post we will see the basics of using and configuring the official Jenkins Docker image","breadcrumb":{"@id":"https:\/\/examples.javacodegeeks.com\/devops\/docker\/jenkins-docker-image-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/examples.javacodegeeks.com\/devops\/docker\/jenkins-docker-image-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/devops\/docker\/jenkins-docker-image-example\/#primaryimage","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/12\/docker-logo.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/12\/docker-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/examples.javacodegeeks.com\/devops\/docker\/jenkins-docker-image-example\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/examples.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"DevOps","item":"https:\/\/examples.javacodegeeks.com\/category\/devops\/"},{"@type":"ListItem","position":3,"name":"Docker","item":"https:\/\/examples.javacodegeeks.com\/category\/devops\/docker\/"},{"@type":"ListItem","position":4,"name":"Jenkins Docker Image Example"}]},{"@type":"WebSite","@id":"https:\/\/examples.javacodegeeks.com\/#website","url":"https:\/\/examples.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Examples and Code Snippets","publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/examples.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/examples.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/780d96edfe3bce18c5440613fa88bce3","name":"Hariharan Narayanan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/10\/Hariharan-Narayanan-96x96.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/10\/Hariharan-Narayanan-96x96.jpg","caption":"Hariharan Narayanan"},"description":"Hari graduated from the School of Computer and Information Sciences in the University of Hyderabad. Over his career he has been involved in many complex projects in mobile applications, enterprise applications, distributed applications, micro-services, and other platforms and frameworks. He works as a consultant and is mainly involved with projects based on Java, C++ and Big Data technologies.","sameAs":["https:\/\/www.javacodegeeks.com"],"url":"https:\/\/examples.javacodegeeks.com\/author\/hariharan-narayanan\/"}]}},"_links":{"self":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/43136","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/users\/103"}],"replies":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=43136"}],"version-history":[{"count":0,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/43136\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media\/31013"}],"wp:attachment":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=43136"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=43136"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=43136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}