{"id":842,"date":"2022-01-14T15:25:07","date_gmt":"2022-01-14T15:25:07","guid":{"rendered":"https:\/\/mailinvest.blog\/index.php\/2022\/01\/14\/how-to-build-docker-images-in-a-gitlab-ci-pipeline-cloudsavvy-it\/"},"modified":"2022-01-14T15:25:07","modified_gmt":"2022-01-14T15:25:07","slug":"how-to-build-docker-images-in-a-gitlab-ci-pipeline-cloudsavvy-it","status":"publish","type":"post","link":"https:\/\/mailinvest.blog\/index.php\/2022\/01\/14\/how-to-build-docker-images-in-a-gitlab-ci-pipeline-cloudsavvy-it\/","title":{"rendered":"How to Build Docker Images In a GitLab CI Pipeline \u2013 CloudSavvy IT"},"content":{"rendered":"<p> <a href=\"https:\/\/go.fiverr.com\/visit\/?bta=1052423&nci=17043\" Target=\"_Top\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"https:\/\/fiverr.ck-cdn.com\/tn\/serve\/?cid=40081059\"  width=\"601\" height=\"201\"><\/a>\n<\/p>\n<div id=\"article-content-area\">\n<p><img loading=\"lazy\" decoding=\"async\" class=\"type:primaryImage aligncenter size-full wp-image-9546\" data-pagespeed-lazy-data-srcset=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/02\/266bb4cf.jpg?width=398&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1 400w, https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/02\/266bb4cf.jpg?width=1198&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1 1200w\" data-sizes=\"auto, 400w, 1200w\" data-pagespeed-lazy-src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/02\/266bb4cf.jpg?width=1198&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Graphic showing the GitLab logo, a stylised fox head\" width=\"1602\" height=\"902\" src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>One common use case for CI pipelines is building the Docker images you\u2019ll use to deploy your application. GitLab CI is a great choice for this as it supports an integrated pull proxy service, meaning faster pipelines, and a built-in registry to store your built images.<\/p>\n<p>In this guide, we\u2019ll show you how to set up Docker builds that use both the above features. The steps you need to take vary slightly depending on the <a href=\"https:\/\/www.cloudsavvyit.com\/8629\/getting-started-with-gitlabs-continuous-integration-deployment-pipelines-ci-cd\">GitLab Runner executor<\/a> type you\u2019ll use for your pipeline. We\u2019ll cover the Shell and Docker executors below.<\/p>\n<h2 id=\"building-with-the-shell-executor\">Building With the Shell Executor<\/h2>\n<p>If you\u2019re using the Shell executor, make sure you\u2019ve got <a href=\"https:\/\/www.cloudsavvyit.com\/10623\/how-to-install-docker-and-docker-compose-on-linux\">Docker installed<\/a> on the machine that hosts your runner. The executor works by running regular shell commands using the <code>docker<\/code> binary on the Runner\u2019s host.<\/p>\n<p>Head to the Git repository for the project you want to build images for. Create a <code>.gitlab-ci.yml<\/code> file at the root of the repository. This file defines the GitLab CI pipeline that will run when you push changes to your project.<\/p>\n<p>Add the following content to the file:<\/p>\n<div class=\"wp-geshi-highlight-wrap5\">\n<div class=\"wp-geshi-highlight-wrap4\">\n<div class=\"wp-geshi-highlight-wrap3\">\n<div class=\"wp-geshi-highlight-wrap2\">\n<div class=\"wp-geshi-highlight-wrap\">\n<div class=\"wp-geshi-highlight\">\n<div class=\"yaml\">\n<pre class=\"de1\"><span class=\"co4\">stages<\/span><span class=\"sy2\">:\n<\/span>  - build\n<span class=\"co4\">\ndocker_build<\/span>:<span class=\"co3\">\n  stage<\/span><span class=\"sy2\">: <\/span>build<span class=\"co4\">\n  script<\/span><span class=\"sy2\">:\n<\/span>    - docker build -t example.com\/example-image:latest .\n    - docker push example.com\/example-image:latest<\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>This simplistic configuration is enough to demonstrate the basics of pipeline-powered image builds. GitLab automatically clones your Git repository into the build environment so running <code>docker build<\/code> will use your project\u2019s <code>Dockerfile<\/code> and make the repository\u2019s content available as <a href=\"https:\/\/www.cloudsavvyit.com\/10271\/understanding-the-docker-build-context-why-you-should-use-dockerignore\">the build context<\/a>.<\/p>\n<p>After the build completes, you can <code>docker push<\/code> the image to your registry. Otherwise it would only be available to the local Docker installation that ran the build. If you\u2019re using a private registry, run <code>docker login<\/code> first to supply proper authentication details:<\/p>\n<pre>script:&#13;\n  - docker login -u $DOCKER_REGISTRY_USER -p $DOCKER_REGISTRY_PASSWORD<\/pre>\n<p>Define the values of the two credential variables by heading to Settings &gt; CI\/CD &gt; Variables in the GitLab web UI. Click the blue \u201cAdd variable\u201d button to create a new variable and assign a value. GitLab will make these variables available in the shell environment used to run your job.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-15118\" data-pagespeed-lazy-src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/12\/12257a3e.jpeg?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" width=\"1254\" height=\"641\" src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<h2 id=\"building-with-the-docker-executor\">Building With the Docker Executor<\/h2>\n<p>GitLab Runner\u2019s Docker executor is commonly used to provide a completely clean environment for each job. The job will execute in an isolated container so the <code>docker<\/code> binary on the Runner host will be inaccessible.<\/p>\n<p>The Docker executor gives you two possible strategies for building your image: either use Docker-in-Docker, or bind the host\u2019s Docker socket into the Runner\u2019s build environment. You then use the official Docker container image as your job\u2019s image, making the <code>docker<\/code> command available in your CI script.<\/p>\n<h3 id=\"docker-in-docker\">Docker-in-Docker<\/h3>\n<p>Using <a href=\"https:\/\/www.cloudsavvyit.com\/14890\/how-and-why-to-run-docker-inside-docker\">Docker-in-Docker<\/a> (DinD) to build your images gives you a fully isolated environment for each job. The Docker process that performs the build will be a child of the container that GitLab Runner creates on the host to run the CI job.<\/p>\n<p>You need to register your GitLab Runner Docker executor with <a href=\"https:\/\/www.cloudsavvyit.com\/5211\/privileged-vs-root-in-docker-whats-the-difference\">privileged mode<\/a> enabled to use DinD. Add the <code>--docker-privileged<\/code> flag when you <a href=\"https:\/\/www.cloudsavvyit.com\/8629\/getting-started-with-gitlabs-continuous-integration-deployment-pipelines-ci-cd\">register your runner<\/a>:<\/p>\n<pre>sudo gitlab-runner register -n &#13;\n  --url https:\/\/example.com &#13;\n  --registration-token $GITLAB_REGISTRATION_TOKEN &#13;\n  --executor docker &#13;\n  --description \"Docker Runner\" &#13;\n  --docker-image \"docker:20.10\" &#13;\n  --docker-volumes \"\/certs\/client\" &#13;\n  --docker-privileged<\/pre>\n<p>Within your CI pipeline, add the <code>docker:dind<\/code> image as a <a href=\"https:\/\/docs.gitlab.com\/ee\/ci\/services\">service<\/a>. This makes Docker available as a separate image that\u2019s linked to the job\u2019s image. You\u2019ll be able to use the <code>docker<\/code> command to build images using the Docker instance in the <code>docker:dind<\/code> container.<\/p>\n<div class=\"wp-geshi-highlight-wrap5\">\n<div class=\"wp-geshi-highlight-wrap4\">\n<div class=\"wp-geshi-highlight-wrap3\">\n<div class=\"wp-geshi-highlight-wrap2\">\n<div class=\"wp-geshi-highlight-wrap\">\n<div class=\"wp-geshi-highlight\">\n<div class=\"yaml\">\n<pre class=\"de1\"><span class=\"co4\">services<\/span><span class=\"sy2\">:\n<\/span>  - docker:dind\n<span class=\"co4\">\ndocker_build<\/span>:<span class=\"co3\">\n  stage<\/span><span class=\"sy2\">: <\/span>build<span class=\"co3\">\n  image<\/span><span class=\"sy2\">: <\/span>docker:latest<span class=\"co4\">\n  script<\/span><span class=\"sy2\">:\n<\/span>    - docker build -t example-image:latest .<\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>Using DinD gives you fully isolated builds that can\u2019t impact each other or your host. The major drawback is more complicated caching behavior: each job gets a new environment where previously built layers won\u2019t be accessible. You can partially address this by trying to pull the previous version of your image before you build, then using the <code>--cache-from<\/code> <a href=\"https:\/\/docs.docker.com\/engine\/reference\/commandline\/build\/\">build flag<\/a> to make the pulled image\u2019s layers available as a cache source:<\/p>\n<div class=\"wp-geshi-highlight-wrap5\">\n<div class=\"wp-geshi-highlight-wrap4\">\n<div class=\"wp-geshi-highlight-wrap3\">\n<div class=\"wp-geshi-highlight-wrap2\">\n<div class=\"wp-geshi-highlight-wrap\">\n<div class=\"wp-geshi-highlight\">\n<div class=\"yaml\">\n<pre class=\"de1\"><span class=\"co4\">docker_build<\/span>:<span class=\"co3\">\n  stage<\/span><span class=\"sy2\">: <\/span>build<span class=\"co3\">\n  image<\/span><span class=\"sy2\">: <\/span>docker:latest<span class=\"co4\">\n  script<\/span><span class=\"sy2\">:\n<\/span>    - docker pull $CI_REGISTRY_IMAGE:latest || true\n    - docker build --cache-from $CI_REGISTRY_IMAGE:latest -t $CI_REGISTRY_IMAGE:latest .<\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<h3 id=\"socket-bind-mounts\">Socket Bind Mounts<\/h3>\n<p>Mounting your host\u2019s Docker socket into your job\u2019s environment is an alternative option when you\u2019re using the Docker executor. This gives you seamless caching and removes the need to add the <code>docker:dind<\/code> service to your CI config.<\/p>\n<p>To set this up, register your Runner with a <code>docker-volumes<\/code> flag that binds the host\u2019s Docker socket to <code>\/var\/run\/docker.sock<\/code> inside job containers:<\/p>\n<pre>sudo gitlab-runner register -n &#13;\n  --url https:\/\/example.com &#13;\n  --registration-token $GITLAB_REGISTRATION_TOKEN &#13;\n  --executor docker &#13;\n  --description \"Docker Runner\" &#13;\n  --docker-image \"docker:20.10\" &#13;\n  --docker-volumes \/var\/run\/docker.sock:\/var\/run\/docker.sock<\/pre>\n<p>Now jobs that run with the <code>docker<\/code> image will be able to use the <code>docker<\/code> binary as normal. Operations will actually occur on your host machine, becoming siblings of the job\u2019s container instead of children.<\/p>\n<p>This is effectively similar to using the shell executor with your host\u2019s Docker installation. Images will reside on the host, facilitating seamless use of regular <code>docker build<\/code> layer caching.<\/p>\n<p>While this approach can lead to higher performance, less configuration, and none of the limitations of DinD, it comes with its own unique issues. Most prominent among these are the security implications: jobs could execute arbitrary Docker commands on your Runner host, so a malicious project in your GitLab instance might run <code>docker run -it malicious-image:latest<\/code> or <code>docker rm -f $(docker ps -a)<\/code> with devastating consequences.<\/p>\n<p>GitLab <a href=\"https:\/\/docs.gitlab.com\/ee\/ci\/docker\/using_docker_build.html#use-docker-socket-binding\">also cautions<\/a> that socket binding can cause problems when jobs run concurrently. This occurs when you rely on containers being created with specific names. If two instances of a job run in parallel, the second one will fail as the container name will already exist on your host.<\/p>\n<p>You should consider using DinD instead if you expect either of these issues will be troublesome. While DinD is <a href=\"https:\/\/jpetazzo.github.io\/2015\/09\/03\/do-not-use-docker-in-docker-for-ci\">no longer generally recommended<\/a>, it can make more sense for public-facing GitLab instances that run concurrent CI jobs.<\/p>\n<h2 id=\"pushing-images-to-gitlabs-registry\">Pushing Images to GitLab\u2019s Registry<\/h2>\n<p>GitLab projects have the option of an <a href=\"https:\/\/docs.gitlab.com\/ee\/user\/packages\/container_registry\">integrated registry<\/a> which you can use to store your images. You can view the registry\u2019s content by navigating to Packages &amp; Registries &gt; Container Registry in your project\u2019s sidebar. If you don\u2019t see this link, enable the registry by going to Settings &gt; General &gt; Visibility, Project, Features &amp; Permissions and activating the \u201cContainer registry\u201d toggle.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-15119\" data-pagespeed-lazy-src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/12\/ced1a75e.jpeg?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" width=\"1254\" height=\"1070\" src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>\u00a0<\/p>\n<p>GitLab automatically sets environment variables in your CI jobs which let you reference your project\u2019s container registry. Adjust the <code>script<\/code> section to login to the registry and push your image:<\/p>\n<div class=\"wp-geshi-highlight-wrap5\">\n<div class=\"wp-geshi-highlight-wrap4\">\n<div class=\"wp-geshi-highlight-wrap3\">\n<div class=\"wp-geshi-highlight-wrap2\">\n<div class=\"wp-geshi-highlight-wrap\">\n<div class=\"wp-geshi-highlight\">\n<div class=\"yaml\">\n<pre class=\"de1\"><span class=\"co4\">script<\/span><span class=\"sy2\">:\n<\/span>  - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY\n  - docker build -t $CI_REGISTRY_IMAGE:latest .\n  - docker push $CI_REGISTRY_IMAGE:latest<\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>GitLab generates a secure set of credentials for each of your CI jobs. The <code>$CI_JOB_TOKEN<\/code> environment variable will contain an access token the job can use to connect to the registry as the <code>gitlab-ci-token<\/code> user. The registry server URL is available as <code>$CI_REGISTRY<\/code>.<\/p>\n<p>The final variable, <code>$CI_REGISTRY_IMAGE<\/code>, provides the complete path to your project\u2019s container registry. This is a suitable base for your image tags. You can extend this variable to create sub-repositories, such as <code>$CI_REGISTRY_IMAGE\/production\/api:latest<\/code>.<\/p>\n<p>\u00a0<\/p>\n<p>Other Docker clients can pull images from the registry by authenticating using an access token. You can generate these on your project\u2019s Settings &gt; Access Tokens screen. Add the <code>read_registry<\/code> scope, then use the displayed credentials to <code>docker login<\/code> to your project\u2019s registry.<\/p>\n<h2 id=\"using-gitlabs-dependency-proxy\">Using GitLab\u2019s Dependency Proxy<\/h2>\n<p><a href=\"https:\/\/www.cloudsavvyit.com\/10394\/how-to-enable-gitlabs-dependency-proxy-for-docker-images\">GitLab\u2019s Dependency Proxy<\/a> provides a caching layer for the upstream images you pull from Docker Hub. It helps you stay within <a href=\"https:\/\/www.docker.com\/increase-rate-limits\">Docker Hub\u2019s rate limits<\/a> by only pulling the content of images when they\u2019ve actually changed. This will also improve the performance of your builds.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10398\" data-pagespeed-lazy-src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/03\/35ccd606.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" width=\"1268\" height=\"658\" src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>The Dependency Proxy is activated at the GitLab group level by heading to Settings &gt; Packages &amp; Registries &gt; Dependency Proxy. Once it\u2019s enabled, prefix image references in your <code>.gitlab-ci.yml<\/code> file with <code>$CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX<\/code> to pull them through the proxy:<\/p>\n<div class=\"wp-geshi-highlight-wrap5\">\n<div class=\"wp-geshi-highlight-wrap4\">\n<div class=\"wp-geshi-highlight-wrap3\">\n<div class=\"wp-geshi-highlight-wrap2\">\n<div class=\"wp-geshi-highlight-wrap\">\n<div class=\"wp-geshi-highlight\">\n<div class=\"yaml\">\n<pre class=\"de1\"><span class=\"co4\">docker_build<\/span>:<span class=\"co3\">\n  stage<\/span><span class=\"sy2\">: <\/span>build<span class=\"co3\">\n  image<\/span><span class=\"sy2\">: <\/span>$CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX\/docker:latest<span class=\"co4\">\n  services<\/span>:<span class=\"co3\">\n    - name<\/span><span class=\"sy2\">: <\/span>$CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX\/docker:dind<span class=\"co3\">\n      alias<\/span><span class=\"sy2\">: <\/span>docker<\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>That\u2019s all there is to it! GitLab Runner automatically logs into the dependency proxy registry so there\u2019s no need to manually supply your credentials.<\/p>\n<p>GitLab will now cache your images, giving you improved performance as well as resiliency to network outages. Note that the <code>services<\/code> definition has had to be adjusted too \u2013 environment variables don\u2019t work with the inline form used earlier, so the full image <code>name<\/code> must be specified, then a command <code>alias<\/code> to reference in your <code>script<\/code> section.<\/p>\n<p>While we\u2019ve now set up the proxy for images directly used by our job stages, more work\u2019s needed to add support for the base image in the <code>Dockerfile<\/code> to build. A regular instruction like this won\u2019t go through the proxy:<\/p>\n<pre>FROM ubuntu:latest<\/pre>\n<p>To add this final piece, use Docker\u2019s build arguments to make the dependency proxy URL available when stepping through the Dockerfile:<\/p>\n<pre>ARG GITLAB_DEPENDENCY_PROXY&#13;\nFROM ${GITLAB_DEPENDENCY_PROXY}\/ubuntu:latest<\/pre>\n<p>Then modify your <code>docker build<\/code> command to define the variable\u2019s value:<\/p>\n<div class=\"wp-geshi-highlight-wrap5\">\n<div class=\"wp-geshi-highlight-wrap4\">\n<div class=\"wp-geshi-highlight-wrap3\">\n<div class=\"wp-geshi-highlight-wrap2\">\n<div class=\"wp-geshi-highlight-wrap\">\n<div class=\"wp-geshi-highlight\">\n<div class=\"yaml\">\n<pre class=\"de1\"><span class=\"co4\">script<\/span><span class=\"sy2\">:\n<\/span>  <span class=\"sy2\">&gt;\n<\/span><span class=\"co0\">    - docker build \n        --build-arg GITLAB_DEPENDENCY_PROXY=${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX} \n        -t example-image:latest .<\/span><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>Now your base image will be pulled through the dependency proxy too.<\/p>\n<h2 id=\"summary\">Summary<\/h2>\n<p>Docker image builds are easily integrated into your GitLab CI pipelines. After initial Runner configuration, <code>docker build<\/code> and <code>docker push<\/code> commands in your job\u2019s <code>script<\/code> section are all you need to create an image with the <code>Dockerfile<\/code> in your repository. GitLab\u2019s built-in container registry gives you private storage for your project\u2019s images.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-15122\" data-pagespeed-lazy-src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/12\/a1a80f0b.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" width=\"1362\" height=\"792\" src=\"https:\/\/mailinvest.blog\/wp-content\/themes\/breek\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Beyond basic builds, it\u2019s worth integrating GitLab\u2019s dependency proxy to accelerate performance and avoid hitting Docker Hub rate limits. You should also check the security of your installation by assessing whether your selected method allows untrusted projects to run commands on your Runner host. Although it carries its own issues, Docker-in-Docker is the safest approach when your GitLab instance is publicly accessible or accessed by a large user base.<\/p>\n<\/div>\n<iframe data-lazy=\"true\" data-src=\"https:\/\/www.fiverr.com\/gig_widgets?id=U2FsdGVkX18x7XQvttUTrv1oEqmGNGTgvvCUiUoJ\/AP4z\/UyMz8lXGOLpu15jIMxBbTR0gmD5uBoFvhC4KWeALQRp3h\/X\/AwcVD0K8Wj9H\/ZzYKzcCNHosB9oS4SCJJFWiN85P9ICAc4OgCoE\/wHKIY7CDkf2\/DQ1vqGvk4smVe5cRDEmrLPCWi4FC8p40VUhSmWQ5udCm0zoJtorgWv3vbDQw0kKYkwn39ozAnQXDe+YvWMxkLFWA+O3TFwkJvdkIK+\/AUSnRssPKt5WHY0FhNOxnSPcLslEL4G4\/RfP95ve99U+kRnDy3X+KtzdQLY+u935ghON\/o3UE4IMv9oN6JX9RnxzL\/LRcOgnHigxStSGPKsZYtnz8RWNVT\/rOLAibqiWJadC5MYHRbekF3eg6FOGrQGkXYbsn0+a5aovnlLCbLwIqY9fcS17UX8J235iQ6cdmHNbrPeS84CMm34RA==&affiliate_id=1052423&strip_google_tagmanager=true\" loading=\"lazy\" data-with-title=\"true\" class=\"fiverr_nga_frame\" frameborder=\"0\" height=\"350\" width=\"100%\" referrerpolicy=\"no-referrer-when-downgrade\" data-mode=\"random_gigs\" onload=\" var frame = this; var script = document.createElement('script'); script.addEventListener('load', function() { window.FW_SDK.register(frame); }); script.setAttribute('src', 'https:\/\/www.fiverr.com\/gig_widgets\/sdk'); document.body.appendChild(script); \" ><\/iframe>\n<br \/><a href=\"https:\/\/www.cloudsavvyit.com\/15115\/how-to-build-docker-images-in-a-gitlab-ci-pipeline\/\">Source link <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>One common use case for CI pipelines is building the Docker images you\u2019ll use to deploy your application. GitLab CI is a great choice for&#8230;<\/p>\n","protected":false},"author":1,"featured_media":843,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-842","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tech-universe"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Build Docker Images In a GitLab CI Pipeline \u2013 CloudSavvy IT - mailinvest.blog<\/title>\n<meta name=\"description\" content=\"Technology is forever changing, and there are always new pieces of technology to replace obsolete ones. Tons of people enjoy reading tech blogs on a daily basis.mailinvest.blog tracks all the latest consumer technology breakthroughs and shows you what&#039;s new, what matters and how technology can enrich your life. mailinvest.blog also provides the information, tools, and advice that helps when deciding what to buy.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/mailinvest.blog\/index.php\/2022\/01\/14\/how-to-build-docker-images-in-a-gitlab-ci-pipeline-cloudsavvy-it\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Build Docker Images In a GitLab CI Pipeline \u2013 CloudSavvy IT - mailinvest.blog\" \/>\n<meta property=\"og:description\" content=\"Technology is forever changing, and there are always new pieces of technology to replace obsolete ones. Tons of people enjoy reading tech blogs on a daily basis.mailinvest.blog tracks all the latest consumer technology breakthroughs and shows you what&#039;s new, what matters and how technology can enrich your life. mailinvest.blog also provides the information, tools, and advice that helps when deciding what to buy.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/mailinvest.blog\/index.php\/2022\/01\/14\/how-to-build-docker-images-in-a-gitlab-ci-pipeline-cloudsavvy-it\/\" \/>\n<meta property=\"og:site_name\" content=\"mailinvest.blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/freelanceracademic\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-01-14T15:25:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/mailinvest.blog\/wp-content\/uploads\/2022\/01\/266bb4cf.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1602\" \/>\n\t<meta property=\"og:image:height\" content=\"902\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin@mailinvest.blog\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin@mailinvest.blog\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2022\\\/01\\\/14\\\/how-to-build-docker-images-in-a-gitlab-ci-pipeline-cloudsavvy-it\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2022\\\/01\\\/14\\\/how-to-build-docker-images-in-a-gitlab-ci-pipeline-cloudsavvy-it\\\/\"},\"author\":{\"name\":\"admin@mailinvest.blog\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#\\\/schema\\\/person\\\/012701c4c204d4e4ebd34f926cfd31a4\"},\"headline\":\"How to Build Docker Images In a GitLab CI Pipeline \u2013 CloudSavvy IT\",\"datePublished\":\"2022-01-14T15:25:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2022\\\/01\\\/14\\\/how-to-build-docker-images-in-a-gitlab-ci-pipeline-cloudsavvy-it\\\/\"},\"wordCount\":1467,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2022\\\/01\\\/14\\\/how-to-build-docker-images-in-a-gitlab-ci-pipeline-cloudsavvy-it\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/mailinvest.blog\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/266bb4cf.jpg\",\"articleSection\":[\"Tech Universe\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2022\\\/01\\\/14\\\/how-to-build-docker-images-in-a-gitlab-ci-pipeline-cloudsavvy-it\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2022\\\/01\\\/14\\\/how-to-build-docker-images-in-a-gitlab-ci-pipeline-cloudsavvy-it\\\/\",\"url\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2022\\\/01\\\/14\\\/how-to-build-docker-images-in-a-gitlab-ci-pipeline-cloudsavvy-it\\\/\",\"name\":\"How to Build Docker Images In a GitLab CI Pipeline \u2013 CloudSavvy IT - mailinvest.blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2022\\\/01\\\/14\\\/how-to-build-docker-images-in-a-gitlab-ci-pipeline-cloudsavvy-it\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2022\\\/01\\\/14\\\/how-to-build-docker-images-in-a-gitlab-ci-pipeline-cloudsavvy-it\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/mailinvest.blog\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/266bb4cf.jpg\",\"datePublished\":\"2022-01-14T15:25:07+00:00\",\"description\":\"Technology is forever changing, and there are always new pieces of technology to replace obsolete ones. Tons of people enjoy reading tech blogs on a daily basis.mailinvest.blog tracks all the latest consumer technology breakthroughs and shows you what's new, what matters and how technology can enrich your life. mailinvest.blog also provides the information, tools, and advice that helps when deciding what to buy.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2022\\\/01\\\/14\\\/how-to-build-docker-images-in-a-gitlab-ci-pipeline-cloudsavvy-it\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2022\\\/01\\\/14\\\/how-to-build-docker-images-in-a-gitlab-ci-pipeline-cloudsavvy-it\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2022\\\/01\\\/14\\\/how-to-build-docker-images-in-a-gitlab-ci-pipeline-cloudsavvy-it\\\/#primaryimage\",\"url\":\"https:\\\/\\\/mailinvest.blog\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/266bb4cf.jpg\",\"contentUrl\":\"https:\\\/\\\/mailinvest.blog\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/266bb4cf.jpg\",\"width\":1602,\"height\":902},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2022\\\/01\\\/14\\\/how-to-build-docker-images-in-a-gitlab-ci-pipeline-cloudsavvy-it\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/mailinvest.blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Build Docker Images In a GitLab CI Pipeline \u2013 CloudSavvy IT\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#website\",\"url\":\"https:\\\/\\\/mailinvest.blog\\\/\",\"name\":\"mailinvest.blog\",\"description\":\"Technology is forever changing, and there are always new pieces of technology to replace obsolete ones. Tons of people enjoy reading tech blogs on a daily basis. mailinvest.blog tracks all the latest consumer technology breakthroughs and shows you what&#039;s new, what matters and how technology can enrich your life. mailinvest.blog also provides the information, tools, and advice that helps when deciding what to buy.\",\"publisher\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/mailinvest.blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#organization\",\"name\":\"mailinvest\",\"url\":\"https:\\\/\\\/mailinvest.blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/mailinvest.blog\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/default.png\",\"contentUrl\":\"https:\\\/\\\/mailinvest.blog\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/default.png\",\"width\":1000,\"height\":1000,\"caption\":\"mailinvest\"},\"image\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/freelanceracademic\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#\\\/schema\\\/person\\\/012701c4c204d4e4ebd34f926cfd31a4\",\"name\":\"admin@mailinvest.blog\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/98ed217bd0f3d6a6dcae2d9b0c76e305b049a07275e315e1407e19ec8b08e139?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/98ed217bd0f3d6a6dcae2d9b0c76e305b049a07275e315e1407e19ec8b08e139?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/98ed217bd0f3d6a6dcae2d9b0c76e305b049a07275e315e1407e19ec8b08e139?s=96&d=mm&r=g\",\"caption\":\"admin@mailinvest.blog\"},\"sameAs\":[\"https:\\\/\\\/mailinvest.blog\",\"admin@mailinvest.blog\"],\"url\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/author\\\/adminmailinvest-blog\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Build Docker Images In a GitLab CI Pipeline \u2013 CloudSavvy IT - mailinvest.blog","description":"Technology is forever changing, and there are always new pieces of technology to replace obsolete ones. Tons of people enjoy reading tech blogs on a daily basis.mailinvest.blog tracks all the latest consumer technology breakthroughs and shows you what's new, what matters and how technology can enrich your life. mailinvest.blog also provides the information, tools, and advice that helps when deciding what to buy.","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:\/\/mailinvest.blog\/index.php\/2022\/01\/14\/how-to-build-docker-images-in-a-gitlab-ci-pipeline-cloudsavvy-it\/","og_locale":"en_US","og_type":"article","og_title":"How to Build Docker Images In a GitLab CI Pipeline \u2013 CloudSavvy IT - mailinvest.blog","og_description":"Technology is forever changing, and there are always new pieces of technology to replace obsolete ones. Tons of people enjoy reading tech blogs on a daily basis.mailinvest.blog tracks all the latest consumer technology breakthroughs and shows you what's new, what matters and how technology can enrich your life. mailinvest.blog also provides the information, tools, and advice that helps when deciding what to buy.","og_url":"https:\/\/mailinvest.blog\/index.php\/2022\/01\/14\/how-to-build-docker-images-in-a-gitlab-ci-pipeline-cloudsavvy-it\/","og_site_name":"mailinvest.blog","article_publisher":"https:\/\/www.facebook.com\/freelanceracademic\/","article_published_time":"2022-01-14T15:25:07+00:00","og_image":[{"width":1602,"height":902,"url":"https:\/\/mailinvest.blog\/wp-content\/uploads\/2022\/01\/266bb4cf.jpg","type":"image\/jpeg"}],"author":"admin@mailinvest.blog","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin@mailinvest.blog","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/mailinvest.blog\/index.php\/2022\/01\/14\/how-to-build-docker-images-in-a-gitlab-ci-pipeline-cloudsavvy-it\/#article","isPartOf":{"@id":"https:\/\/mailinvest.blog\/index.php\/2022\/01\/14\/how-to-build-docker-images-in-a-gitlab-ci-pipeline-cloudsavvy-it\/"},"author":{"name":"admin@mailinvest.blog","@id":"https:\/\/mailinvest.blog\/#\/schema\/person\/012701c4c204d4e4ebd34f926cfd31a4"},"headline":"How to Build Docker Images In a GitLab CI Pipeline \u2013 CloudSavvy IT","datePublished":"2022-01-14T15:25:07+00:00","mainEntityOfPage":{"@id":"https:\/\/mailinvest.blog\/index.php\/2022\/01\/14\/how-to-build-docker-images-in-a-gitlab-ci-pipeline-cloudsavvy-it\/"},"wordCount":1467,"commentCount":0,"publisher":{"@id":"https:\/\/mailinvest.blog\/#organization"},"image":{"@id":"https:\/\/mailinvest.blog\/index.php\/2022\/01\/14\/how-to-build-docker-images-in-a-gitlab-ci-pipeline-cloudsavvy-it\/#primaryimage"},"thumbnailUrl":"https:\/\/mailinvest.blog\/wp-content\/uploads\/2022\/01\/266bb4cf.jpg","articleSection":["Tech Universe"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/mailinvest.blog\/index.php\/2022\/01\/14\/how-to-build-docker-images-in-a-gitlab-ci-pipeline-cloudsavvy-it\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/mailinvest.blog\/index.php\/2022\/01\/14\/how-to-build-docker-images-in-a-gitlab-ci-pipeline-cloudsavvy-it\/","url":"https:\/\/mailinvest.blog\/index.php\/2022\/01\/14\/how-to-build-docker-images-in-a-gitlab-ci-pipeline-cloudsavvy-it\/","name":"How to Build Docker Images In a GitLab CI Pipeline \u2013 CloudSavvy IT - mailinvest.blog","isPartOf":{"@id":"https:\/\/mailinvest.blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/mailinvest.blog\/index.php\/2022\/01\/14\/how-to-build-docker-images-in-a-gitlab-ci-pipeline-cloudsavvy-it\/#primaryimage"},"image":{"@id":"https:\/\/mailinvest.blog\/index.php\/2022\/01\/14\/how-to-build-docker-images-in-a-gitlab-ci-pipeline-cloudsavvy-it\/#primaryimage"},"thumbnailUrl":"https:\/\/mailinvest.blog\/wp-content\/uploads\/2022\/01\/266bb4cf.jpg","datePublished":"2022-01-14T15:25:07+00:00","description":"Technology is forever changing, and there are always new pieces of technology to replace obsolete ones. Tons of people enjoy reading tech blogs on a daily basis.mailinvest.blog tracks all the latest consumer technology breakthroughs and shows you what's new, what matters and how technology can enrich your life. mailinvest.blog also provides the information, tools, and advice that helps when deciding what to buy.","breadcrumb":{"@id":"https:\/\/mailinvest.blog\/index.php\/2022\/01\/14\/how-to-build-docker-images-in-a-gitlab-ci-pipeline-cloudsavvy-it\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/mailinvest.blog\/index.php\/2022\/01\/14\/how-to-build-docker-images-in-a-gitlab-ci-pipeline-cloudsavvy-it\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mailinvest.blog\/index.php\/2022\/01\/14\/how-to-build-docker-images-in-a-gitlab-ci-pipeline-cloudsavvy-it\/#primaryimage","url":"https:\/\/mailinvest.blog\/wp-content\/uploads\/2022\/01\/266bb4cf.jpg","contentUrl":"https:\/\/mailinvest.blog\/wp-content\/uploads\/2022\/01\/266bb4cf.jpg","width":1602,"height":902},{"@type":"BreadcrumbList","@id":"https:\/\/mailinvest.blog\/index.php\/2022\/01\/14\/how-to-build-docker-images-in-a-gitlab-ci-pipeline-cloudsavvy-it\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/mailinvest.blog\/"},{"@type":"ListItem","position":2,"name":"How to Build Docker Images In a GitLab CI Pipeline \u2013 CloudSavvy IT"}]},{"@type":"WebSite","@id":"https:\/\/mailinvest.blog\/#website","url":"https:\/\/mailinvest.blog\/","name":"mailinvest.blog","description":"Technology is forever changing, and there are always new pieces of technology to replace obsolete ones. Tons of people enjoy reading tech blogs on a daily basis. mailinvest.blog tracks all the latest consumer technology breakthroughs and shows you what&#039;s new, what matters and how technology can enrich your life. mailinvest.blog also provides the information, tools, and advice that helps when deciding what to buy.","publisher":{"@id":"https:\/\/mailinvest.blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/mailinvest.blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/mailinvest.blog\/#organization","name":"mailinvest","url":"https:\/\/mailinvest.blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mailinvest.blog\/#\/schema\/logo\/image\/","url":"https:\/\/mailinvest.blog\/wp-content\/uploads\/2022\/01\/default.png","contentUrl":"https:\/\/mailinvest.blog\/wp-content\/uploads\/2022\/01\/default.png","width":1000,"height":1000,"caption":"mailinvest"},"image":{"@id":"https:\/\/mailinvest.blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/freelanceracademic\/"]},{"@type":"Person","@id":"https:\/\/mailinvest.blog\/#\/schema\/person\/012701c4c204d4e4ebd34f926cfd31a4","name":"admin@mailinvest.blog","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/98ed217bd0f3d6a6dcae2d9b0c76e305b049a07275e315e1407e19ec8b08e139?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/98ed217bd0f3d6a6dcae2d9b0c76e305b049a07275e315e1407e19ec8b08e139?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/98ed217bd0f3d6a6dcae2d9b0c76e305b049a07275e315e1407e19ec8b08e139?s=96&d=mm&r=g","caption":"admin@mailinvest.blog"},"sameAs":["https:\/\/mailinvest.blog","admin@mailinvest.blog"],"url":"https:\/\/mailinvest.blog\/index.php\/author\/adminmailinvest-blog\/"}]}},"_links":{"self":[{"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/posts\/842","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/comments?post=842"}],"version-history":[{"count":0,"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/posts\/842\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/media\/843"}],"wp:attachment":[{"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/media?parent=842"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/categories?post=842"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/tags?post=842"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}