{"id":15650,"date":"2017-01-05T12:15:17","date_gmt":"2017-01-05T10:15:17","guid":{"rendered":"http:\/\/www.webcodegeeks.com\/?p=15650"},"modified":"2017-01-03T17:41:08","modified_gmt":"2017-01-03T15:41:08","slug":"build-docker-images-packer-ansible","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/devops\/build-docker-images-packer-ansible\/","title":{"rendered":"Build Docker Images with Packer and Ansible"},"content":{"rendered":"<p>Recently someone asked me where a good place is to get started learning tools like docker, packer and ansible. I did some quick googling and didn\u2019t find what I thought were really good, in-depth tutorials so I decided to write one myself!<\/p>\n<h2>Getting Started<\/h2>\n<p>This tutorial assumes you are working with OSX although you should be able to accomplish the same results on a linux workstation by seeking out the packages required for your platform.<br \/>\nTo get started, let\u2019s install the following tools. If you don\u2019t already have <a class=\"markup--anchor markup--p-anchor\" href=\"http:\/\/brew.sh\/\" target=\"_blank\" data-href=\"http:\/\/brew.sh\/\">homebrew<\/a> installed I recommend installing it first.<\/p>\n<ul class=\"postList\">\n<li>Install <a class=\"markup--anchor markup--li-anchor\" href=\"https:\/\/www.packer.io\/\" target=\"_blank\" data-href=\"https:\/\/www.packer.io\/\">packer<\/a>. You can install it via <code class=\"markup--code markup--li-code\">brew install packer<\/code>.<\/li>\n<li>Install <a class=\"markup--anchor markup--li-anchor\" href=\"https:\/\/docs.docker.com\/engine\/installation\/mac\/\" target=\"_blank\" data-href=\"https:\/\/docs.docker.com\/engine\/installation\/mac\/\">Docker.<\/a><\/li>\n<li>Install <a class=\"markup--anchor markup--li-anchor\" href=\"https:\/\/www.ansible.com\/\" target=\"_blank\" data-href=\"https:\/\/www.ansible.com\/\">ansible<\/a> (<code class=\"markup--code markup--li-code\">brew install ansible<\/code>).<\/li>\n<\/ul>\n<h2>Our First Packer\u00a0Template<\/h2>\n<p>The goal of this tutorial is to get a packer template together that will build a docker image using ansible to provision it. With that in mind, we\u2019re going start by first dipping our toes into packer and use the <a class=\"markup--anchor markup--p-anchor\" href=\"https:\/\/www.packer.io\/docs\/builders\/docker.html\" target=\"_blank\" data-href=\"https:\/\/www.packer.io\/docs\/builders\/docker.html\">docker builder<\/a>, the <a class=\"markup--anchor markup--p-anchor\" href=\"https:\/\/www.packer.io\/docs\/provisioners\/shell-local.html\" target=\"_blank\" data-href=\"https:\/\/www.packer.io\/docs\/provisioners\/shell-local.html\">local shell provisioner<\/a> and finally a <a class=\"markup--anchor markup--p-anchor\" href=\"https:\/\/www.packer.io\/docs\/post-processors\/docker-import.html\" target=\"_blank\" data-href=\"https:\/\/www.packer.io\/docs\/post-processors\/docker-import.html\">docker post-processor<\/a> to export docker image with a single file added to <code class=\"markup--code markup--p-code\">\/root<\/code>.<\/p>\n<pre class=\"brush:bash\">{\r\n  \"builders\": [{\r\n    \"type\": \"docker\",\r\n    \"image\": \"ubuntu:16.04\",\r\n    \"commit\": \"true\"\r\n  }],\r\n \"provisioners\": [\r\n    {\r\n      \"type\": \"shell\",\r\n      \"inline\": [\"echo 'hello!' &gt; \/root\/foo\"]\r\n    }\r\n  ],\r\n  \"post-processors\": [\r\n    [\r\n      {\r\n        \"type\": \"docker-tag\",\r\n        \"repository\": \"jamescarr\/demo\",\r\n        \"tag\": \"0.1\"\r\n      }\r\n    ]\r\n  ]\r\n}<\/pre>\n<p>Save this as template.json and run <code class=\"markup--code markup--p-code\">packer build template.json<\/code>. Once the build finishes you should be able to run the docker image and inspect it.<\/p>\n<pre class=\"brush:bash\">jamescarr@Jamess-MacBook-Pro-2 ~\/Projects\/docker-ansible \r\n[13:11:49]\r\n&gt; $ docker run -it jamescarr\/demo:0.1 bash  \r\n\u2b21 6.2.2\r\nroot@bec87474b4a7:\/# ls \/root\r\nfoo\r\nroot@bec87474b4a7:\/# cat \/root\/foo\r\nhello!\r\n<\/pre>\n<h2>Adding Ansible<\/h2>\n<p>Next, let\u2019s swap out our shell provisioner with ansible. There are two options you can go with, <a class=\"markup--anchor markup--p-anchor\" href=\"https:\/\/www.packer.io\/docs\/provisioners\/ansible-local.html\" target=\"_blank\" data-href=\"https:\/\/www.packer.io\/docs\/provisioners\/ansible-local.html\">ansible-local<\/a> or <a class=\"markup--anchor markup--p-anchor\" href=\"https:\/\/www.packer.io\/docs\/provisioners\/ansible.html\" target=\"_blank\" data-href=\"https:\/\/www.packer.io\/docs\/provisioners\/ansible.html\">ansible-remote<\/a>. The difference here is that ansible-local will run on the target (in this case, in a docker container) while ansible remote will run on your local machine against the target (typically over ssh). Basically your needs will determine which you want to use. If you want ansible on the target image (perhaps to render templates on container start) then <code class=\"markup--code markup--p-code\">ansible-local<\/code> is the right path to go while <code class=\"markup--code markup--p-code\">ansible-remote<\/code> is great if we want to use ansible to provision the image but want to leave ansible off of the resulting image.<br \/>\nThis one will be a rather big change\u2026 we need to use <code class=\"markup--code markup--p-code\">docker<\/code> as the <code class=\"markup--code markup--p-code\">ansible_connection<\/code> as the default will try to connect over ssh and transfer files via scp\u2026 obviously this won\u2019t work in docker unless our container runs an ssh server! So we need to instruct ansible to use the <a class=\"markup--anchor markup--p-anchor\" href=\"http:\/\/blog.oddbit.com\/2015\/10\/13\/ansible-20-the-docker-connection-driver\/\" target=\"_blank\" data-href=\"http:\/\/blog.oddbit.com\/2015\/10\/13\/ansible-20-the-docker-connection-driver\/\">docker connection driver<\/a> to connect. This also requires us to create a consistent hostname, so we define a container name to use when building. We also use the shell provisioner again to install python since ansible will require python on the target and the docker image doesn\u2019t have it by default.<br \/>\nHere\u2019s the updated <code class=\"markup--code markup--p-code\">template.json:<\/code><\/p>\n<pre class=\"brush:bash\">{\r\n  \"variables\": {\r\n    \"ansible_host\": \"default\",\r\n    \"ansible_connection\": \"docker\"\r\n  },\r\n  \"builders\": [\r\n    {\r\n      \"type\": \"docker\",\r\n      \"image\": \"ubuntu:16.04\",\r\n      \"commit\": \"true\",\r\n      \"run_command\": [\r\n        \"-d\",\r\n        \"-i\",\r\n        \"-t\",\r\n        \"--name\",\r\n        \"{{user `ansible_host`}}\",\r\n        \"{{.Image}}\",\r\n        \"\/bin\/bash\"\r\n      ]\r\n    }\r\n  ],\r\n  \"provisioners\": [\r\n    {\r\n      \"type\": \"shell\",\r\n      \"inline\": [\r\n        \"apt-get update\",\r\n        \"apt-get install python -yq\"\r\n      ]\r\n    },\r\n    {\r\n      \"type\": \"ansible\",\r\n      \"user\": \"root\",\r\n      \"playbook_file\": \".\/playbook.yml\",\r\n      \"extra_arguments\": [\r\n        \"--extra-vars\",\r\n        \"ansible_host={{user `ansible_host`}} ansible_connection={{user `ansible_connection`}}\"\r\n      ]\r\n    }\r\n  ],\r\n  \"post-processors\": [\r\n    [\r\n      {\r\n        \"type\": \"docker-tag\",\r\n        \"repository\": \"jamescarr\/demo\",\r\n        \"tag\": \"0.1\"\r\n      }\r\n    ]\r\n  ]\r\n}<\/pre>\n<p>And the new <code class=\"markup--code markup--p-code\">playbook.yml<\/code> file which has a single task that uses <a class=\"markup--anchor markup--p-anchor\" href=\"http:\/\/docs.ansible.com\/ansible\/copy_module.html\" target=\"_blank\" data-href=\"http:\/\/docs.ansible.com\/ansible\/copy_module.html\">copy<\/a> to generate a file similar to what we created previously with the shell provisioner.<\/p>\n<pre class=\"brush:bash\">---\r\n- name: A demo to run ansible in a docker container\r\n  hosts: all\r\n  tasks:\r\n    - name: Add a file to root's home dir\r\n      copy:\r\n        dest: \/root\/foo\r\n        content: Hello World!\r\n        owner: root<\/pre>\n<p>Run <code class=\"markup--code markup--p-code\">packer build template.json<\/code> and once it completes, let\u2019s test it out.<\/p>\n<pre class=\"brush:bash\">jamescarr@Jamess-MacBook-Pro-2 ~\/Projects\/docker-ansible   \r\n[13:47:00]\r\n&gt; $ docker run -it jamescarr\/demo:0.1 bash    \r\n\u2b21 6.2.2 [\u00b1master \u25cf\u25cf]\r\nroot@2c46ddf2d657:\/# cat \/root\/foo\r\nHello World!root@2c46ddf2d657:\/# ^C\r\n(failed reverse-i-search)`pa': ^C\r\nroot@2c46ddf2d657:\/# exit\r\nexit<\/pre>\n<h2>Next Up<\/h2>\n<p>I hope this has been a good quick overview on getting started using packer, ansible and docker. This didn\u2019t really produce much useful aside from introducing the pieces and providing a foundation to start with. Tomorrow\u2019s post I\u2019ll tackle some larger \u201creal world\u201d solutions and how to make this a bit more dynamic!<\/p>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td><span class=\"reference\">Reference: <\/span><\/td>\n<td><a href=\"https:\/\/blog.james-carr.org\/build-docker-images-with-packer-and-ansible-3f40b734ef4f#.rzesmn6uc\">Build Docker Images with Packer and Ansible<\/a> from our <a href=\"http:\/\/www.webcodegeeks.com\/join-us\/wcg\/\">WCG partner<\/a>\u00a0James Carr at the <a href=\"http:\/\/blog.james-carr.org\/\">James Carr<\/a> blog.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Recently someone asked me where a good place is to get started learning tools like docker, packer and ansible. I did some quick googling and didn\u2019t find what I thought were really good, in-depth tutorials so I decided to write one myself! Getting Started This tutorial assumes you are working with OSX although you should &hellip;<\/p>\n","protected":false},"author":209,"featured_media":10356,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[422,217,421],"class_list":["post-15650","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops","tag-ansible","tag-docker","tag-packer"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Build Docker Images with Packer and Ansible - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"Recently someone asked me where a good place is to get started learning tools like docker, packer and ansible. I did some quick googling and didn\u2019t find\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webcodegeeks.com\/devops\/build-docker-images-packer-ansible\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Build Docker Images with Packer and Ansible - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"Recently someone asked me where a good place is to get started learning tools like docker, packer and ansible. I did some quick googling and didn\u2019t find\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/devops\/build-docker-images-packer-ansible\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webcodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2017-01-05T10:15:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/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=\"James Carr\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"James Carr\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/build-docker-images-packer-ansible\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/build-docker-images-packer-ansible\/\"},\"author\":{\"name\":\"James Carr\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/3fee9c530d4d22d6ac8ba305fb88e575\"},\"headline\":\"Build Docker Images with Packer and Ansible\",\"datePublished\":\"2017-01-05T10:15:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/build-docker-images-packer-ansible\/\"},\"wordCount\":536,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/build-docker-images-packer-ansible\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg\",\"keywords\":[\"Ansible\",\"Docker\",\"Packer\"],\"articleSection\":[\"DevOps\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/devops\/build-docker-images-packer-ansible\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/build-docker-images-packer-ansible\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/devops\/build-docker-images-packer-ansible\/\",\"name\":\"Build Docker Images with Packer and Ansible - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/build-docker-images-packer-ansible\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/build-docker-images-packer-ansible\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg\",\"datePublished\":\"2017-01-05T10:15:17+00:00\",\"description\":\"Recently someone asked me where a good place is to get started learning tools like docker, packer and ansible. I did some quick googling and didn\u2019t find\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/build-docker-images-packer-ansible\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/devops\/build-docker-images-packer-ansible\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/build-docker-images-packer-ansible\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/devops\/build-docker-images-packer-ansible\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"DevOps\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/devops\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Build Docker Images with Packer and Ansible\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"name\":\"Web Code Geeks\",\"description\":\"Web Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webcodegeeks\",\"https:\/\/x.com\/webcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/3fee9c530d4d22d6ac8ba305fb88e575\",\"name\":\"James Carr\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/751c55f22a64fa5ac630c3bddaf1a4f4e11c442aaa9fc308004564cdca64b900?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/751c55f22a64fa5ac630c3bddaf1a4f4e11c442aaa9fc308004564cdca64b900?s=96&d=mm&r=g\",\"caption\":\"James Carr\"},\"sameAs\":[\"http:\/\/blog.james-carr.org\/\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/james-carr\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Build Docker Images with Packer and Ansible - Web Code Geeks - 2026","description":"Recently someone asked me where a good place is to get started learning tools like docker, packer and ansible. I did some quick googling and didn\u2019t find","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:\/\/www.webcodegeeks.com\/devops\/build-docker-images-packer-ansible\/","og_locale":"en_US","og_type":"article","og_title":"Build Docker Images with Packer and Ansible - Web Code Geeks - 2026","og_description":"Recently someone asked me where a good place is to get started learning tools like docker, packer and ansible. I did some quick googling and didn\u2019t find","og_url":"https:\/\/www.webcodegeeks.com\/devops\/build-docker-images-packer-ansible\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_published_time":"2017-01-05T10:15:17+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg","type":"image\/jpeg"}],"author":"James Carr","twitter_card":"summary_large_image","twitter_creator":"@webcodegeeks","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"James Carr","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/devops\/build-docker-images-packer-ansible\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/devops\/build-docker-images-packer-ansible\/"},"author":{"name":"James Carr","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/3fee9c530d4d22d6ac8ba305fb88e575"},"headline":"Build Docker Images with Packer and Ansible","datePublished":"2017-01-05T10:15:17+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/devops\/build-docker-images-packer-ansible\/"},"wordCount":536,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/devops\/build-docker-images-packer-ansible\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg","keywords":["Ansible","Docker","Packer"],"articleSection":["DevOps"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/devops\/build-docker-images-packer-ansible\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/devops\/build-docker-images-packer-ansible\/","url":"https:\/\/www.webcodegeeks.com\/devops\/build-docker-images-packer-ansible\/","name":"Build Docker Images with Packer and Ansible - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/devops\/build-docker-images-packer-ansible\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/devops\/build-docker-images-packer-ansible\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg","datePublished":"2017-01-05T10:15:17+00:00","description":"Recently someone asked me where a good place is to get started learning tools like docker, packer and ansible. I did some quick googling and didn\u2019t find","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/devops\/build-docker-images-packer-ansible\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/devops\/build-docker-images-packer-ansible\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/devops\/build-docker-images-packer-ansible\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/01\/docker-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/devops\/build-docker-images-packer-ansible\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"DevOps","item":"https:\/\/www.webcodegeeks.com\/category\/devops\/"},{"@type":"ListItem","position":3,"name":"Build Docker Images with Packer and Ansible"}]},{"@type":"WebSite","@id":"https:\/\/www.webcodegeeks.com\/#website","url":"https:\/\/www.webcodegeeks.com\/","name":"Web Code Geeks","description":"Web Developers Resource Center","publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.webcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webcodegeeks","https:\/\/x.com\/webcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/3fee9c530d4d22d6ac8ba305fb88e575","name":"James Carr","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/751c55f22a64fa5ac630c3bddaf1a4f4e11c442aaa9fc308004564cdca64b900?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/751c55f22a64fa5ac630c3bddaf1a4f4e11c442aaa9fc308004564cdca64b900?s=96&d=mm&r=g","caption":"James Carr"},"sameAs":["http:\/\/blog.james-carr.org\/"],"url":"https:\/\/www.webcodegeeks.com\/author\/james-carr\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/15650","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/users\/209"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=15650"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/15650\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/10356"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=15650"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=15650"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=15650"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}