{"id":2829,"date":"2023-06-12T20:57:39","date_gmt":"2023-06-12T19:57:39","guid":{"rendered":"https:\/\/hypervlab.co.uk\/?p=2829"},"modified":"2023-06-12T20:57:40","modified_gmt":"2023-06-12T19:57:40","slug":"automating-your-dockerfile-builds","status":"publish","type":"post","link":"https:\/\/hypervlab.co.uk\/?p=2829","title":{"rendered":"Automating your Dockerfile Builds"},"content":{"rendered":"<span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Reading Time: <\/span> <span class=\"rt-time\"> 4<\/span> <span class=\"rt-label rt-postfix\">minutes<\/span><\/span>\n<p>Hellooo people of the interwebs, in this post, I shall be showing how I&#8217;ve learnt how to automate my docker image builds using a GitHub Action with multiple branches. So let me give you some high-level background, the TDLR is that there is a process at my work which is too hands-on and we want to remove the hands and free up engineering time to be more productive elsewhere, thus we shall &#8216;Automate All The Things!&#8217; Starting with the build process. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Scope of Project<\/h2>\n\n\n\n<p>Currently, the docker build process is a manual step and requires someone to run about three commands in theory, on the premise that the GitHub repository is already cloned to their machine, the following steps are.<\/p>\n\n\n\n<p>Step One : Authenticate to Container Registry<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$PatToken = \"&lt;insert-github-pat-token-here&gt;\"\n$PatToken | docker login ghcr.io\/&lt;username&gt;\/&lt;repository&gt; -u &lt;username&gt; --password-stdin<\/code><\/pre>\n\n\n\n<p>Step Two : Build a new Docker Image from the Docker file<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker build -t ghcr.io\/&lt;username&gt;\/&lt;repository&gt;:1.0.0 .<\/code><\/pre>\n\n\n\n<p>Step Three : Push said new image to the Container Registry<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker push ghcr.io\/&lt;username&gt;\/&lt;repository&gt;:1.0.0<\/code><\/pre>\n\n\n\n<p>Currently, this whole process can take around 10-15 minutes, due to the build image and packages required for the image and then upload time to the container registry, I could make like 5 coffees in that time!! &#8211; So Enough, we will automate this. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The GitHub Repository Breakdown<\/h2>\n\n\n\n<p>So for this example, I wanted to try and be slick and clever and break up the GitHub repository into branches, So have the following.<\/p>\n\n\n\n<figure class=\"wp-block-table aligncenter\"><table><tbody><tr><td class=\"has-text-align-left\" data-align=\"left\">Branch Name<\/td><td>Branch Description<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">main<\/td><td>readme and overview files<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">container-image<\/td><td>Dockerfile<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">modules<\/td><td>Automation Modules, Which will get clones into the next yaml file<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><br>NOTE, there might be better or more efficient ways to do this, But figured I would learn some extra about branch control at the same time \ud83d\ude42<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">YAML Timeeee<\/h2>\n\n\n\n<p>Ok, So you want to see the YAML, Before we get to the YAML file let me give you a super quick rundown of what the action does.<\/p>\n\n\n\n<p>Step One: Job Starts<br>Step Two : Check Out the Branch &#8220;Container-Image&#8221;<br>Step Three : Check the Contence of Checkout, echo &#8220;pwd&#8221; and &#8220;ls&#8221;<br>Step Four: Get the Current Package version from Container Registry (Using GitHub API)<br>Step Five: Increase the version Number N+1 (This will be improved later on &#8211; not in this post though)<br>Step Six: Log into the GitHub Container Registry<br>Step Seven: Build Time (Create Image from Dockerfile) and then Push to GHCR<br>Step Eight: Check Image has been pushed successfully to GHCR  (Using GitHub API)<br>Step Nine: Update GitHub Repository Variable for image for next yaml file reference  (Using GitHub API)<br>Step Ten : Post Cleanup of Github Action <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The YAML<\/h2>\n\n\n\n<p>Please note, If you are going to use this you will need to replace the ${{secret.PAT_TOKEN}} value or create one for your Action<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>name: Update Container Image\non:\n  workflow_dispatch:\n  push:\n    branches:\n      - container-image\n  schedule:\n    - cron: '0 0 1 *\/3 *'\n    \njobs:\n  Update_Container_Image:\n    runs-on: ubuntu-latest\n    \n    steps:\n      - name: Checkout repository\n        uses: actions\/checkout@v3\n        with:\n          ref: container-image\n    \n      - name: Check Directory Contents\n        run: |\n          pwd\n          ls \n\n      - name: Get Current Package Version\n        run: |\n          response=$(curl -s -H \"Accept: application\/vnd.github.v3+json\" -H \"Authorization: Bearer ${{ secrets.PAT_TOKEN }}\" \\\n          \"https:\/\/api.github.com\/user\/packages\/container\/${{ github.event.repository.name }}\/versions\" | jq '.&#91;0]')\n          \n          # Verbose \n          current_version=$(echo \"$response\" | jq -r '.metadata.container.tags&#91;0]')\n          echo \"Current Package Version: $current_version\"\n          echo \"CURRENT_VERSION=$current_version\" &gt;&gt; $GITHUB_ENV\n\n      - name: Increment Package Version Tag\n        run: |\n          current_version=${{ env.CURRENT_VERSION }}\n          IFS='.' read -ra version_parts &lt;&lt;&lt; \"$current_version\"\n          major=\"${version_parts&#91;0]}\"\n          minor=\"${version_parts&#91;1]}\"\n          patch=\"${version_parts&#91;2]}\"\n          incremented_patch=$((patch + 1))\n          incremented_version=\"$major.$minor.$incremented_patch\"\n          echo \"Incremented Package Version: $incremented_version\"\n          echo \"NEXT_VERSION=$incremented_version\" &gt;&gt; $GITHUB_ENV\n\n      - name: Login to GitHub Container Registry\n        uses: docker\/login-action@v2.2.0\n        with:\n          registry: ghcr.io\n          username: ${{ github.repository_owner }}\n          password: ${{ secrets.PAT_TOKEN }}\n          \n      - name: Build and Push Updated Container to GHCR\n        uses: docker\/build-push-action@v4\n        with:\n          tags: ghcr.io\/${{ github.repository }}:${{ env.NEXT_VERSION }}          \n          context: \/home\/runner\/work\/${{ github.event.repository.name }}\/${{ github.event.repository.name }}\n          file: .\/Dockerfile\n          push: true\n        env:\n          github_token: ${{ secrets.PAT_TOKEN }}\n          \n      - name: Check Updated Container Version in GitHub Container Registry\n        run: |\n          response=$(curl -s -H \"Accept: application\/vnd.github.v3+json\" -H \"Authorization: Bearer ${{ secrets.PAT_TOKEN }}\" \\\n          \"https:\/\/api.github.com\/user\/packages\/container\/${{ github.event.repository.name }}\/versions\" | jq '.&#91;0]')\n          \n          # Verbose \n          updated_version=$(echo \"$response\" | jq -r '.metadata.container.tags&#91;0]')\n          echo \"Updated Package Version: $updated_version\"\n          echo \"UPDATED_VERSION=$updated_version\" &gt;&gt; $GITHUB_ENV          \n\n      - name: Update GitHub Variable &#91;CONTAINER_IMAGE]\n        run: |\n          echo \"ghcr.io\/${{ github.repository }}:${{ env.UPDATED_VERSION }}\"\n          curl -X PATCH \\\n            -H \"Authorization: Bearer ${{ secrets.PAT_TOKEN }}\" -H \"Accept: application\/vnd.github.v3+json\" \\\n            -d '{\"name\": \"CONTAINER_IMAGE\", \"value\": \"ghcr.io\/${{ github.repository }}:${{ env.UPDATED_VERSION }}\" }' \\\n            \"https:\/\/api.github.com\/repos\/${{ github.repository }}\/actions\/variables\/CONTAINER_IMAGE\"\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Update GitHub Variable Step<\/h2>\n\n\n\n<p>Just to give some better context for this stage (for those who might be newer to Git, YAML and Action), In the GitHub Repository I have a variable named CONTAINER_IMAGE. This allows for zero-touch updates to the YAML File for the actual deployment steps, As it will just reference the value and mean I don&#8217;t have to manually keep updating things \ud83e\udd73<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2023\/06\/image_censored.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"805\" height=\"239\" src=\"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2023\/06\/image_censored.jpg\" alt=\"\" class=\"wp-image-2834\" srcset=\"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2023\/06\/image_censored.jpg 805w, https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2023\/06\/image_censored-300x89.jpg 300w, https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2023\/06\/image_censored-768x228.jpg 768w, https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2023\/06\/image_censored-640x190.jpg 640w, https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2023\/06\/image_censored-681x202.jpg 681w\" sizes=\"auto, (max-width: 805px) 100vw, 805px\" \/><\/a><\/figure><\/div>\n\n\n<p>Once the GitHub Action has been either manually triggered  &#8211; by a person or automatically based on a push to the branch or the cronjob. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2023\/06\/image-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"286\" src=\"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2023\/06\/image-1-1024x286.png\" alt=\"\" class=\"wp-image-2832\" srcset=\"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2023\/06\/image-1-1024x286.png 1024w, https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2023\/06\/image-1-300x84.png 300w, https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2023\/06\/image-1-768x214.png 768w, https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2023\/06\/image-1-1536x428.png 1536w, https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2023\/06\/image-1-2048x571.png 2048w, https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2023\/06\/image-1-1506x420.png 1506w, https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2023\/06\/image-1-640x178.png 640w, https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2023\/06\/image-1-681x190.png 681w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>it will update the variable. just \ud83d\udc4f like \ud83d\udc4f that \ud83d\udc4f<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2023\/06\/image-2_censored.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"789\" height=\"235\" src=\"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2023\/06\/image-2_censored.jpg\" alt=\"\" class=\"wp-image-2835\" srcset=\"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2023\/06\/image-2_censored.jpg 789w, https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2023\/06\/image-2_censored-300x89.jpg 300w, https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2023\/06\/image-2_censored-768x229.jpg 768w, https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2023\/06\/image-2_censored-640x191.jpg 640w, https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2023\/06\/image-2_censored-681x203.jpg 681w\" sizes=\"auto, (max-width: 789px) 100vw, 789px\" \/><\/a><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\">Wrap Up<\/h2>\n\n\n\n<p>So this pretty much covers this v1 release of this YAML File, There is some improvement I want to make to version control and tagging, but as a read-to-run file which might help people get started in automating some of their container builds, I hope this helps. <br><br>If you want to discuss this further, you can find me on Twitter as @smoon_lee and until then I shall see you next time \ud83d\udc4b<\/p>\n","protected":false},"excerpt":{"rendered":"<p><span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Reading Time: <\/span> <span class=\"rt-time\"> 4<\/span> <span class=\"rt-label rt-postfix\">minutes<\/span><\/span>Hellooo people of the interwebs, in this post, I shall be showing how I&#8217;ve learnt how to automate my docker image builds using a GitHub Action with multiple branches. So let me give you some high-level background, the TDLR is that there is a process at my work which is too hands-on and we want [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":2830,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29],"tags":[216,342,346,345,120,344,343,289],"class_list":{"0":"post-2829","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","6":"hentry","7":"category-docker","8":"tag-automation","10":"tag-dockerbuild","11":"tag-dockerfile","12":"tag-github","13":"tag-github-action","14":"tag-yaml","15":"tag-zerotouch"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Automating your Dockerfile Builds - HypervLAB<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/hypervlab.co.uk\/?p=2829\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Automating your Dockerfile Builds - HypervLAB\" \/>\n<meta property=\"og:description\" content=\"Reading Time:  4 minutesHellooo people of the interwebs, in this post, I shall be showing how I&#8217;ve learnt how to automate my docker image builds using a GitHub Action with multiple branches. So let me give you some high-level background, the TDLR is that there is a process at my work which is too hands-on and we want [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/hypervlab.co.uk\/?p=2829\" \/>\n<meta property=\"og:site_name\" content=\"HypervLAB\" \/>\n<meta property=\"article:published_time\" content=\"2023-06-12T19:57:39+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-06-12T19:57:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2023\/06\/header_automating_docker_image_builds.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Simon Lee\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/smoon_lee\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Simon Lee\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/hypervlab.co.uk\/?p=2829\",\"url\":\"https:\/\/hypervlab.co.uk\/?p=2829\",\"name\":\"Automating your Dockerfile Builds - HypervLAB\",\"isPartOf\":{\"@id\":\"https:\/\/hypervlab.co.uk\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/hypervlab.co.uk\/?p=2829#primaryimage\"},\"image\":{\"@id\":\"https:\/\/hypervlab.co.uk\/?p=2829#primaryimage\"},\"thumbnailUrl\":\"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2023\/06\/header_automating_docker_image_builds.png\",\"datePublished\":\"2023-06-12T19:57:39+00:00\",\"dateModified\":\"2023-06-12T19:57:40+00:00\",\"author\":{\"@id\":\"https:\/\/hypervlab.co.uk\/#\/schema\/person\/7d184970612a9c6a5f1babb8b6b4d359\"},\"breadcrumb\":{\"@id\":\"https:\/\/hypervlab.co.uk\/?p=2829#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/hypervlab.co.uk\/?p=2829\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/hypervlab.co.uk\/?p=2829#primaryimage\",\"url\":\"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2023\/06\/header_automating_docker_image_builds.png\",\"contentUrl\":\"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2023\/06\/header_automating_docker_image_builds.png\",\"width\":1200,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/hypervlab.co.uk\/?p=2829#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/hypervlab.co.uk\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Automating your Dockerfile Builds\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/hypervlab.co.uk\/#website\",\"url\":\"https:\/\/hypervlab.co.uk\/\",\"name\":\"HypervLAB\",\"description\":\"Blogging about all thing Microsoft\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/hypervlab.co.uk\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/hypervlab.co.uk\/#\/schema\/person\/7d184970612a9c6a5f1babb8b6b4d359\",\"name\":\"Simon Lee\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/hypervlab.co.uk\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/9473a3cf9c75192508eccfd9d072efab80adf04a45083e561d0e3065f681c34c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/9473a3cf9c75192508eccfd9d072efab80adf04a45083e561d0e3065f681c34c?s=96&d=mm&r=g\",\"caption\":\"Simon Lee\"},\"description\":\"Hi, I'm Simon an IT Enthusiast, PowerShell Geek, Gamer, and Sound Engineer. I've been working with in the IT Industry for around 6 years and have worked across private and public sector companies. The original idea behind \\\"hypervlab\\\" was that I required an 'RnD' environment which would allow me to be able to replicate any kind of enterprise on-premise environment which I could use for learning and testing without learning in a production environment. So in 2019, I decided to branch out and use the domain for a public facing blog to be able to contribute to the IT Community about all things Microsoft.\",\"sameAs\":[\"https:\/\/hypervlab.co.uk\",\"https:\/\/www.linkedin.com\/in\/simon-john-lee\/\",\"https:\/\/x.com\/https:\/\/twitter.com\/smoon_lee\"],\"url\":\"https:\/\/hypervlab.co.uk\/?author=2\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Automating your Dockerfile Builds - HypervLAB","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:\/\/hypervlab.co.uk\/?p=2829","og_locale":"en_GB","og_type":"article","og_title":"Automating your Dockerfile Builds - HypervLAB","og_description":"Reading Time:  4 minutesHellooo people of the interwebs, in this post, I shall be showing how I&#8217;ve learnt how to automate my docker image builds using a GitHub Action with multiple branches. So let me give you some high-level background, the TDLR is that there is a process at my work which is too hands-on and we want [&hellip;]","og_url":"https:\/\/hypervlab.co.uk\/?p=2829","og_site_name":"HypervLAB","article_published_time":"2023-06-12T19:57:39+00:00","article_modified_time":"2023-06-12T19:57:40+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2023\/06\/header_automating_docker_image_builds.png","type":"image\/png"}],"author":"Simon Lee","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/smoon_lee","twitter_misc":{"Written by":"Simon Lee","Estimated reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/hypervlab.co.uk\/?p=2829","url":"https:\/\/hypervlab.co.uk\/?p=2829","name":"Automating your Dockerfile Builds - HypervLAB","isPartOf":{"@id":"https:\/\/hypervlab.co.uk\/#website"},"primaryImageOfPage":{"@id":"https:\/\/hypervlab.co.uk\/?p=2829#primaryimage"},"image":{"@id":"https:\/\/hypervlab.co.uk\/?p=2829#primaryimage"},"thumbnailUrl":"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2023\/06\/header_automating_docker_image_builds.png","datePublished":"2023-06-12T19:57:39+00:00","dateModified":"2023-06-12T19:57:40+00:00","author":{"@id":"https:\/\/hypervlab.co.uk\/#\/schema\/person\/7d184970612a9c6a5f1babb8b6b4d359"},"breadcrumb":{"@id":"https:\/\/hypervlab.co.uk\/?p=2829#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/hypervlab.co.uk\/?p=2829"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/hypervlab.co.uk\/?p=2829#primaryimage","url":"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2023\/06\/header_automating_docker_image_builds.png","contentUrl":"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2023\/06\/header_automating_docker_image_builds.png","width":1200,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/hypervlab.co.uk\/?p=2829#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/hypervlab.co.uk\/"},{"@type":"ListItem","position":2,"name":"Automating your Dockerfile Builds"}]},{"@type":"WebSite","@id":"https:\/\/hypervlab.co.uk\/#website","url":"https:\/\/hypervlab.co.uk\/","name":"HypervLAB","description":"Blogging about all thing Microsoft","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/hypervlab.co.uk\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/hypervlab.co.uk\/#\/schema\/person\/7d184970612a9c6a5f1babb8b6b4d359","name":"Simon Lee","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/hypervlab.co.uk\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/9473a3cf9c75192508eccfd9d072efab80adf04a45083e561d0e3065f681c34c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9473a3cf9c75192508eccfd9d072efab80adf04a45083e561d0e3065f681c34c?s=96&d=mm&r=g","caption":"Simon Lee"},"description":"Hi, I'm Simon an IT Enthusiast, PowerShell Geek, Gamer, and Sound Engineer. I've been working with in the IT Industry for around 6 years and have worked across private and public sector companies. The original idea behind \"hypervlab\" was that I required an 'RnD' environment which would allow me to be able to replicate any kind of enterprise on-premise environment which I could use for learning and testing without learning in a production environment. So in 2019, I decided to branch out and use the domain for a public facing blog to be able to contribute to the IT Community about all things Microsoft.","sameAs":["https:\/\/hypervlab.co.uk","https:\/\/www.linkedin.com\/in\/simon-john-lee\/","https:\/\/x.com\/https:\/\/twitter.com\/smoon_lee"],"url":"https:\/\/hypervlab.co.uk\/?author=2"}]}},"_links":{"self":[{"href":"https:\/\/hypervlab.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/2829","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hypervlab.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hypervlab.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hypervlab.co.uk\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/hypervlab.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2829"}],"version-history":[{"count":5,"href":"https:\/\/hypervlab.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/2829\/revisions"}],"predecessor-version":[{"id":2844,"href":"https:\/\/hypervlab.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/2829\/revisions\/2844"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hypervlab.co.uk\/index.php?rest_route=\/wp\/v2\/media\/2830"}],"wp:attachment":[{"href":"https:\/\/hypervlab.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2829"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hypervlab.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2829"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hypervlab.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2829"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}