<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Vecha Sumanth</title>
    <description>The latest articles on DEV Community by Vecha Sumanth (@kyoobi).</description>
    <link>https://dev.to/kyoobi</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1150652%2F8280a1a9-0897-48a1-aa2f-2e37e4747a6f.jpeg</url>
      <title>DEV Community: Vecha Sumanth</title>
      <link>https://dev.to/kyoobi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kyoobi"/>
    <language>en</language>
    <item>
      <title>Gitlab - Registry Setup</title>
      <dc:creator>Vecha Sumanth</dc:creator>
      <pubDate>Wed, 23 Apr 2025 14:36:07 +0000</pubDate>
      <link>https://dev.to/kyoobi/gitlab-registry-setup-5065</link>
      <guid>https://dev.to/kyoobi/gitlab-registry-setup-5065</guid>
      <description>&lt;p&gt;A Registry is the source of truth for any container image you use. It's a secure way to store and fetch the images you need.&lt;/p&gt;

&lt;p&gt;To simplify it even further, think of it as a &lt;strong&gt;warehouse for container images&lt;/strong&gt;. Let’s set it up and give it a run.&lt;/p&gt;

&lt;p&gt;Before we start setting up the Registry VM, we need to tweak some settings on the GitLab Server VM.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 1 : Configure Gitlab Server VM
&lt;/h4&gt;

&lt;p&gt;Edit &lt;code&gt;/etc/gitlab/gitlab.rb&lt;/code&gt; with the registry details:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;################################################################################
## Container Registry settings
##! Docs: https://docs.gitlab.com/ee/administration/packages/container_registry.html
################################################################################

registry_external_url 'http://&amp;lt;YOUR_REGISTRY_IP&amp;gt;:80'

### Settings used by GitLab application
gitlab_rails['registry_enabled'] = true
gitlab_rails['registry_host'] = "http://&amp;lt;YOUR_REGISTRY_IP&amp;gt;:80"
gitlab_rails['registry_port'] = "80"
gitlab_rails['registry_path'] = "/var/opt/gitlab/gitlab-rails/shared/registry"

###! Notification secret, it's used to authenticate notification requests to GitLab application
###! You only need to change this when you use external Registry service, otherwise
###! it will be taken directly from notification settings of your Registry
# gitlab_rails['registry_notification_secret'] = nil

###! **Do not change the following 3 settings unless you know what you are
###!   doing**
gitlab_rails['registry_api_url'] = "http://&amp;lt;YOUR_REGISTRY_IP&amp;gt;:80"
gitlab_rails['registry_key_path'] = "/var/opt/gitlab/gitlab-rails/certificate.key"
gitlab_rails['registry_issuer'] = "omnibus-gitlab-issuer"

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This generates the certificate.key, which will come in handy later. Now, let's move on to the Registry VM&lt;/p&gt;




&lt;h4&gt;
  
  
  Step 2 : Setup Docker Dependencies
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;yum install containerd.io docker-ce-cli docker-ce
systemctl daemon-reload
systemctl enable --now docker
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Step 3 : Create Registry Configuration Directories
&lt;/h4&gt;

&lt;p&gt;We’ll store our Registry configs in &lt;code&gt;/etc/docker/registry&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mkdir -p /etc/docker/registry
chmod 700 /etc/docker/registry
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;gitlab-registry.crt&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;config.yml.&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Generate gitlab-registry.crt on the &lt;strong&gt;Gitlab Server&lt;/strong&gt; like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;openssl req -key /var/opt/gitlab/gitlab-rails/certificate.key \
            -new -x509 \
            -out gitlab-registry.crt \
            -subj "/CN=omnibus-gitlab-issuer"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here’s a basic config.yml template you can customize:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;version: 0.1
log:
  fields:
    service: registry
  level: info
storage:
  cache:
    blobdescriptor: inmemory
  filesystem:
    rootdirectory: /var/lib/registry
  delete:
    enabled: true
http:
  addr: 0.0.0.0:80
  headers:
    X-Content-Type-Options: [nosniff]
health:
  storagedriver:
    enabled: true
    interval: 10s
    threshold: 3
auth:
  token:
    realm: https://&amp;lt;YOUR_GITLAB_IP&amp;gt;:80/jwt/auth
    service: container_registry
    issuer: omnibus-gitlab-issuer
    rootcertbundle: /etc/docker/registry/gitlab-registry.crt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add the config files:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vi gitlab-registry.crt
chmod 600 gitlab-registry.crt
vi config.yml
chmod 600 config.yml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Step 4 : Pull the GitLab Container Registry Image.
&lt;/h4&gt;

&lt;p&gt;I have Gitlab &lt;code&gt;v17.10.4&lt;/code&gt; setup. Check for your registry version &lt;a href="https://gitlab.com/gitlab-org/build/CNG/-/blob/v17.10.4/gitlab-container-registry/Dockerfile?ref_type=tags#L10" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker pull registry.gitlab.com/gitlab-org/build/cng/gitlab-container-registry:v4.15.2-gitlab
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Step 5 : Run the Registry Image
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run --user root -d --name registry --restart=always -v /etc/docker/registry:/etc/docker/registry -p 80:5000 registry.gitlab.com/gitlab-org/build/cng/gitlab-container-registry:v4.15.2-gitlab

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;Before you go to Gitlab and test it out, the runner will need a slight tweak -&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 6 : Configure Gitlab Runner VM
&lt;/h4&gt;

&lt;p&gt;Make sure to add an insecure registry entry in the Gitlab Runner VM &lt;code&gt;/etc/docker/daemon.json&lt;/code&gt; as shown below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "insecure-registries" : [ "&amp;lt;YOUR_RUNNER_IP&amp;gt;:5000" ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Restart Daemon &amp;amp; Docker Services&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;systemctl daemon-reload
systemctl restart docker
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, run a quick docker login using your GitLab credentials to confirm everything’s wired up correctly.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker login &amp;lt;YOUR_REGISTRY_IP&amp;gt;:80
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;And that's it! You’ve now got a fully functioning private container registry as part of your DevOps setup.&lt;/p&gt;

&lt;p&gt;In case you got stuck somewhere, feel free to drop a comment — I’ll try to answer as best as I can.&lt;/p&gt;

&lt;p&gt;You can also checkout &lt;a href="//forum.gitlab.com"&gt;gitlab forum&lt;/a&gt; for any additional help or queries.&lt;/p&gt;

</description>
      <category>gitlab</category>
      <category>devops</category>
      <category>containers</category>
      <category>cicd</category>
    </item>
    <item>
      <title>Gitlab - Runner Setup</title>
      <dc:creator>Vecha Sumanth</dc:creator>
      <pubDate>Sun, 20 Apr 2025 13:37:56 +0000</pubDate>
      <link>https://dev.to/kyoobi/gitlab-runner-setup-4fc</link>
      <guid>https://dev.to/kyoobi/gitlab-runner-setup-4fc</guid>
      <description>&lt;p&gt;The Runner is a super important part of the GitLab ecosystem. Builds, tests, deployments — you name it, and the Runner’s got you covered.&lt;/p&gt;

&lt;p&gt;In simple terms, Runners are agents that execute GitLab CI/CD jobs in your pipeline. So if you're setting up GitLab in a meaningful way, you'll definitely need one. Fortunately, installing a Runner is pretty straightforward—just like setting up the GitLab server.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 1 : Setup Docker Dependencies
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;yum install containerd.io docker-ce-cli docker-ce
systemctl daemon-reload
systemctl enable --now docker
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Step 2 : Setup Gitlab Runner Repository
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl -L "https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.rpm.sh" | sudo -E bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Step 3 : Install Gitlab Runner
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;yum -y --disablerepo='*' --enablerepo='gitlab_gitlab-runner' install gitlab-runner-17.10.1-1.x86_64
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Step 4: Register the Runner
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Head over to &lt;code&gt;http://&amp;lt;YOUR_GITLAB_URL&amp;gt;/admin/runners&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Click New Instance Runner&lt;/li&gt;
&lt;li&gt;Enable Run untagged jobs and Paused&lt;/li&gt;
&lt;li&gt;Hit Create Runner to generate your token
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gitlab-runner register --non-interactive --url {GITLAB_URL} --token {RUNNER_TOKEN} --description "{RUNNER_NAME}" --executor docker

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Go to Gitlab - http:///admin/runners and check for the new runner.&lt;/p&gt;

&lt;p&gt;Congratulations! You've successfully created your Runner!&lt;/p&gt;

&lt;p&gt;In case you got stuck somewhere, feel free to drop a comment — I’ll try to answer as best as I can.&lt;/p&gt;

&lt;p&gt;You can also checkout &lt;a href="//forum.gitlab.com"&gt;gitlab forum&lt;/a&gt; for any additional help or queries.&lt;/p&gt;

</description>
      <category>gitlab</category>
      <category>devops</category>
      <category>runner</category>
    </item>
    <item>
      <title>Gitlab - Self Managed Server Setup</title>
      <dc:creator>Vecha Sumanth</dc:creator>
      <pubDate>Sat, 19 Apr 2025 06:08:57 +0000</pubDate>
      <link>https://dev.to/kyoobi/a-beginners-guide-to-setting-up-your-self-managed-gitlab-server-10hp</link>
      <guid>https://dev.to/kyoobi/a-beginners-guide-to-setting-up-your-self-managed-gitlab-server-10hp</guid>
      <description>&lt;p&gt;It’s been a while since I’ve put any of my learnings online — and I’ve realised I should do it more often. Starting now, I’m committing to writing two articles per week to stay consistent with blogging.&lt;/p&gt;

&lt;p&gt;Most of my writing will revolve around the OG DevOps platform, &lt;strong&gt;GitLab&lt;/strong&gt;  — with the occasional detour into Carl Jung’s theory of the unconscious. Don’t worry, I’m just capping. For any existential spirals, follow &lt;a href="https://medium.com/@vechasays" rel="noopener noreferrer"&gt;@vechasays&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In this first article, we’ll walk through how to set up a GitLab CE self-managed server on your VM.&lt;/p&gt;

&lt;p&gt;For a solid DevOps foundation, I recommend setting up your GitLab environment with the following components:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Server&lt;/li&gt;
&lt;li&gt;Runner&lt;/li&gt;
&lt;li&gt;Registry&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this guide, we’ll set up the main server — I’ll cover the runner and registry in the next ones.&lt;/p&gt;

&lt;h2&gt;
  
  
  Server Setup
&lt;/h2&gt;

&lt;p&gt;There’s only one prerequisite: access to a VM.&lt;/p&gt;

&lt;p&gt;Want to make it instantly usable for your team? Set it up on the cloud.&lt;/p&gt;

&lt;p&gt;Since this is a beginner-friendly guide, I’ll skip the advanced requirements and keep things as minimal as possible.&lt;/p&gt;

&lt;p&gt;I’ll be using RHEL8 for the rest of this guide, but feel free to use any Linux distribution you prefer.&lt;/p&gt;

&lt;p&gt;Step 1 : Opening up the firewall&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https
systemctl reload firewalld
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 2 : Set Environment Variables&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;echo "LC_ALL=en_US.UTF-8" &amp;gt; /etc/environment
echo "LANG=en_US.UTF-8"  &amp;gt;&amp;gt; /etc/environment
echo LC_CTYPE="en_US.UTF-8" &amp;gt;&amp;gt; /etc/environment
source /etc/environment
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 3 : Setup Gitlab-CE Server Repository&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl -L https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh &amp;gt; /tmp/script.rpm.sh
bash -x /tmp/script.rpm.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 4 : Install Gitlab-CE&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;yum -y --disablerepo='*' --enablerepo='gitlab_gitlab-ce' install gitlab-ce-17.10.4-ce.0.el8.x86_64
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 5 : Edit config file &lt;code&gt;/etc/gitlab/gitlab.rb&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Make sure that the external_url is set to your Load Balancer IP Address.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#Make a Copy
cp /etc/gitlab/gitlab.rb /etc/gitlab/gitlab.rb.template

#Edit external_url
vi /etc/gitlab/gitlab.rb
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.
.
external_url 'http://&amp;lt;LOAD_BALANCER_IP&amp;gt;:80'
.
.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 6 : Hit Reconfigure&lt;/p&gt;

&lt;p&gt;This will take some time as it brings the install to life by creating directories and starting up services.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gitlab-ctl reconfigure
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Go to &lt;code&gt;http://&amp;lt;LOAD_BALANCER_IP&amp;gt;:80/&lt;/code&gt; on your browser and login with the admin credentials.&lt;br&gt;
Username : root&lt;/p&gt;

&lt;p&gt;&lt;code&gt;/etc/gitlab/initial_root_password&lt;/code&gt; has your password&lt;/p&gt;

&lt;p&gt;Congratulations! You've successfully setup your own DevOps Platform!&lt;/p&gt;

&lt;p&gt;In case you got stuck somewhere, feel free to drop a comment — I’ll try to answer as best as I can.&lt;/p&gt;

&lt;p&gt;You can also checkout &lt;a href="//forum.gitlab.com"&gt;gitlab forum&lt;/a&gt; for any additional help or queries.&lt;/p&gt;

</description>
      <category>gitlab</category>
      <category>devops</category>
      <category>cicd</category>
    </item>
    <item>
      <title>Understanding the Docker Registry Structure - Gitlab</title>
      <dc:creator>Vecha Sumanth</dc:creator>
      <pubDate>Wed, 20 Sep 2023 13:46:35 +0000</pubDate>
      <link>https://dev.to/kyoobi/understanding-the-docker-registry-structure-gitlab-469o</link>
      <guid>https://dev.to/kyoobi/understanding-the-docker-registry-structure-gitlab-469o</guid>
      <description>&lt;h3&gt;
  
  
  Overview
&lt;/h3&gt;

&lt;p&gt;With the Docker container registry image, Gitlab allows &lt;em&gt;the chosen few&lt;/em&gt; (Hail DevOps) to integrate a private container registry seamlessly. A couple of edits in the &lt;code&gt;gitlab.rb&lt;/code&gt; file and you should be good to go.&lt;/p&gt;

&lt;p&gt;The Docker container registry is a pretty stable and reliable piece of software which makes the life of a DevOps Engineer slightly easy. Although there would be some cases where you'd like to play with it. &lt;em&gt;(ensuring chaos ensues)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F23fw6rfb3v4uj7747kuh.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F23fw6rfb3v4uj7747kuh.gif" alt="this-is-fine-fire.gif" width="1024" height="1024"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Finding the treasure
&lt;/h3&gt;

&lt;p&gt;When the Container Registry Image is run by default the &lt;code&gt;rootdirectory&lt;/code&gt; set as &lt;code&gt;/var/docker/registry&lt;/code&gt;. Which should be the same in most cases.&lt;/p&gt;

&lt;p&gt;On mild forensics the file structure comes out to be as shown as below -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- /var/docker/registry
    - v2
        - blobs
        - repositories
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;v2&lt;/code&gt; corresponds to the Docker Registry API version which Version 2 in this case.&lt;/p&gt;

&lt;p&gt;On further digging the &lt;code&gt;repositories&lt;/code&gt; directory hosts the following sub-directories -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- repositories
    - gitlab-test-user
        - gitlab-test-repo
            - _layers
            - _manifests
                - revisions
                - tags
                    - sample-tag
                        - current
                            - link
                        - index
            _ _uploads

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Phew! That's a long list, but the most important of all is the &lt;code&gt;link&lt;/code&gt; component. The link itself is not the image but an ID.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"Then where is the Image?"&lt;/em&gt;, you ask.&lt;/p&gt;

&lt;p&gt;The "Image Data" is stored in the blobs directory under the &lt;code&gt;v2&lt;/code&gt; directory. Opening up blobs gives us the this -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- blobs
    - sha256
        - 3b
        - cb
        - f6
            - f662ea83eddb8ce7e979cb6c09527feace32d32500e027fa87bf5362d732af16
                - data
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Haha, Finally the data!&lt;br&gt;
&lt;em&gt;Uhmmm not yet.&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "schemaVersion": 2,
    "mediaType": "application/vnd.docker.distribution.manifest.v2+json"
    "config": {
        "mediaType": "application/vnd.docker.container.image.v1+json"
        "size": 1619,
        "digest"; "sha256:3b0372d60921e1cc0c017732ff6d41f8e4880246a6d9c8c9d101edc1726a79ab"
    },
    "layers": [
        {
            "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
            "size": 2813316,
            "digest": "sha256:cbdbe7a5bc2a134caBec91be58565ec07d037386d1f1d8385412d224deafca08"
        }
    ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is rather a JSON document containing details of the image.&lt;/p&gt;

&lt;p&gt;The config digest &lt;code&gt;("sha256:3b0372d60921e1cc0c017732ff6d41f8e4880246a6d9c8c9d101edc1726a79ab")&lt;/code&gt; is a link to a document that will instruct docker on how to build the image. It can be found under &lt;code&gt;blobs/sha256/3b&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;One thing to understand is that a Docker Image is not a single chunk of data rather it is a collection of layers. This is a really efficient technique to store data as this helps in not storing redundant pieces of information as we will see later.&lt;/p&gt;

&lt;p&gt;Now moving on to the second part of the above "data" file is the link to where the layers of the image are stored. Here we have the digest as &lt;code&gt;"sha256: cbdbe7a5bc2a134caBec91be58565ec07d037386d1f1d8385412d224deafca08"&lt;/code&gt; which again can be found under &lt;code&gt;blobs/sha256/cb&lt;/code&gt;, you can now see the Image in its layers form. Since we have only one layer here, that itself is the image or rather the ingredient of the image which will be used by docker to create the image.&lt;/p&gt;

&lt;p&gt;The layers themselves are single pieces but when combined make up the image. This helps in saving up space.&lt;/p&gt;

&lt;p&gt;Take a scenario where the same image is being pushed into the registry, this time rather than again storing the redundant piece of data, docker will link to the same &lt;code&gt;image layer&lt;/code&gt; as the previous one. Saving us with some space.&lt;/p&gt;

&lt;p&gt;Considering the case where the are some changes to the image and is pushed to the same or a different repository, docker will create a new layer which is the &lt;code&gt;diff&lt;/code&gt; (just the modified part) part of the new image and simply create a link and add this to the configuration file which we saw earlier.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "schemaVersion": 2,
    "mediaType": "application/vnd.docker.distribution.manifest.v2+json"
    "config": {
        "mediaType": "application/vnd.docker. container. image.v1+json"
        "size": 1619,
        "digest"; "sha256:3b0372d60921e1cc0c017732ff6d41f8e4880246a6d9c8c9d101edc1726a79ab"
    },
    "layers": [
        {
            "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
            "size": 2813316,
            "digest": "sha256:cbdbe7a5bc2a134caBec91be58565ec07d037386d1f1d8385412d224deafca08"
        },
        {
            "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
            "size": 109,
            "digest": "sha256:5110abe04d9e848d121feb3cc36dd0ec20465f6f67f6dc49699ea408bc244188"
        }
    ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The modified part of the image forms a new layer and the link to that layer has been added to the file.&lt;/p&gt;

&lt;p&gt;Summing up, whenever we do a &lt;code&gt;docker pull&lt;/code&gt; to the registry it will go and fetch the link under the respective repository, which points towards the manifest file in blobs containing the recipe (instructions) and the ingredients (layers) which docker will then use to make the image.&lt;/p&gt;

&lt;p&gt;For further explanation - &lt;a href="https://www.youtube.com/watch?v=i5mbF2bgWoM" rel="noopener noreferrer"&gt;Reference&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp9zd5do7opsaw36bk185.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp9zd5do7opsaw36bk185.gif" alt="Thanks" width="640" height="310"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
