<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>OCI &#8211; hackanooga</title>
	<atom:link href="/category/oci/feed/" rel="self" type="application/rss+xml" />
	<link>/</link>
	<description>Confessions of a homelab hacker</description>
	<lastBuildDate>Tue, 12 Mar 2024 19:11:32 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.2</generator>

<image>
	<url>/wp-content/uploads/2024/03/cropped-cropped-avatar-32x32.png</url>
	<title>OCI &#8211; hackanooga</title>
	<link>/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Self hosted package registries with Gitea</title>
		<link>/self-hosted-package-registries-with-gitea/</link>
		
		<dc:creator><![CDATA[mikeconrad]]></dc:creator>
		<pubDate>Thu, 07 Mar 2024 15:07:07 +0000</pubDate>
				<category><![CDATA[Automation]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[OCI]]></category>
		<category><![CDATA[Self Hosted]]></category>
		<category><![CDATA[Blog Post]]></category>
		<guid isPermaLink="false">https://wordpress.hackanooga.com/?p=413</guid>

					<description><![CDATA[I am a big proponent of open source technologies. I have been using Gitea for a couple years now in my homelab. A few years ago I moved most of my code off of Github and onto my self hosted instance. I recently came across a really handy feature that I didn&#8217;t know Gitea had [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>I am a big proponent of open source technologies.  I have been using <a href="https://about.gitea.com/" data-type="link" data-id="https://about.gitea.com/">Gitea</a> for a couple years now in my homelab.  A few years ago I moved most of my code off of Github and onto my self hosted instance.  I recently came across a really handy feature that I didn&#8217;t know Gitea had and was pleasantly surprised by: <a href="https://docs.gitea.com/usage/packages/overview?_highlight=packag" data-type="link" data-id="https://docs.gitea.com/usage/packages/overview?_highlight=packag">Package Registry</a>.  You are no doubt familiar with what a package registry is in the broad context.  Here are some examples of package registries you probably use on a regular basis:</p>



<ul class="wp-block-list">
<li>npm</li>



<li>cargo</li>



<li>docker</li>



<li>composer</li>



<li>nuget</li>



<li>helm</li>
</ul>



<p>There are a number of reasons why you would want to self host a registry.  For example, in my home lab I have some <code>Docker</code> images that are specific to my use cases and I don&#8217;t necessarily want them on a public registry.  I&#8217;m also not concerned about losing the artifacts as I can easily recreate them from code.  Gitea makes this really easy to setup, in fact it comes baked in with the installation.  For the sake of this post I will just assume that you already have Gitea installed and setup.  </p>



<p>Since the package registry is baked in and enabled by default, I will demonstrate how easy it is to push a docker image.  We will pull the default <code>alpine</code> image, re-tag it and push it to our internal registry:<br> </p>



<pre class="wp-block-code"><code># Pull the official Alpine image
docker pull alpine:latest

# Re tag the image with our local registry information
docker tag alpine:latest git.hackanooga.com/mikeconrad/alpine:latest

# Login using your gitea user account
docker login git.hackanooga.com

# Push the image to our registry
docker push git.hackanooga.com/mikeconrad/alpine:latest

</code></pre>



<p>Now log into your Gitea instance, navigate to your user account and look for <code>packages</code>.  You should see the newly uploaded alpine image.</p>



<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="1024" height="313" src="https://wordpress.hackanooga.com/wp-content/uploads/2024/03/image-6-1024x313.png" alt="" class="wp-image-414" srcset="/wp-content/uploads/2024/03/image-6-1024x313.png 1024w, /wp-content/uploads/2024/03/image-6-300x92.png 300w, /wp-content/uploads/2024/03/image-6-768x235.png 768w, /wp-content/uploads/2024/03/image-6-1536x469.png 1536w, /wp-content/uploads/2024/03/image-6.png 1693w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>You can see that the package type is container.  Clicking on it will give you more information:</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="437" src="https://wordpress.hackanooga.com/wp-content/uploads/2024/03/image-7-1024x437.png" alt="" class="wp-image-415" srcset="/wp-content/uploads/2024/03/image-7-1024x437.png 1024w, /wp-content/uploads/2024/03/image-7-300x128.png 300w, /wp-content/uploads/2024/03/image-7-768x328.png 768w, /wp-content/uploads/2024/03/image-7-1536x655.png 1536w, /wp-content/uploads/2024/03/image-7.png 1636w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
