Use local base image

Hello, I am using podman and would like to use a base image from my local registry. How can I do this? It seems that whenever I use localhost/image it tries to ping local host over https (which of course doesn't work).
14 Replies
xyny
xyny6d ago
@Luke Skywunker might now about this i know of at least two alternative ways which may or may not be the only option: 1) host a local registry server and push to that 2) build to a tarball and rebase to that (bluebuild has commands to do this directly)
wnuke
wnukeOP6d ago
Option 1 is what I have been kind of considering if it's not possible to do it otherwise... but I'm curious about option 2, if I already have an oci archive tarball can I use that to build an iso? I have a non ostree system (gentoo) and am trying to build an iso installer, I have to do everything "from scratch" (really just patching all of the base images and their dependencies) because I am trying to build for aarch64 (asahi/m1 macs)
xyny
xyny6d ago
i'm not familiar with jasonn3's project supporting building ISOs from a tarball, and i'm not knowledgable enough of bootc-image-builder to say how/if it could be done with that. a problem would be that the system would not know which image to pull updates from, you would have to setup that manually
wnuke
wnukeOP6d ago
Hmm right, I have been looking at jasonn3's project but it seems to really dislike my use of a non x86 architecture (almost certainly user error as I am entirely new to fedora, ostree, and bootc) but I'm using bootc in the hopes of avoiding that build pipeline
xyny
xyny6d ago
about option 1, i just found out about https://distribution.github.io/distribution/
CNCF Distribution
Distribution Registry
High-level overview of the Registry
xyny
xyny6d ago
it's a CNCF project and seems really convenient and simple to set up
wnuke
wnukeOP6d ago
Oh awesome, thanks for the link! I'll give that a shot
xyny
xyny6d ago
no web ui, i don't think, but setup is rly easy
wnuke
wnukeOP6d ago
Yeah, honestly I consider the lack of a gui or web ui to be a feature in tools like that
xyny
xyny6d ago
haha yeah
wnuke
wnukeOP6d ago
I do almost everything over ssh, so having to forward extra ports or a graphical session is just extra hassle
xyny
xyny6d ago
if you were planning to host public images on it it would be good to have a webui IMO, but for private hosting it doesn't really matter
Luke Skywunker
This should be possible, I created a PR for this a while ago in that project But yeah @xyny is fairly on point about how to build off a local image
wnuke
wnukeOP6d ago
Yeah I set up a local registry and it works now (The build now fails because the builder image architecture is wrong, but at least it gets past finding my image) I guess I will need to rebuild/patch blue build to use a locally built arm64 image of jasonn3's builder image... Got all that stuff working, except jasonn3's image has dependencies that don't exist on arm64 so I would need to patch both it and lorax I'm going to look for other ways to make a bootable image as I have a feeling learning and patching the lorax codebase will be very time intensive Anyways, thanks for the pointers on getting the local registry setup, this actually simplified a lot of my other workflows too

Did you find this page helpful?