clearlinux / clr-distro-factory

Clear Linux* Distro Factory
16 stars 14 forks source link

Create a Docker image from scratch #54

Open gtkramer opened 5 years ago

gtkramer commented 5 years ago

A docker folder should be made in the config repository containing folders for each image name. Each image folder name should have the following files inside of it:

This data should be used as input to a process that builds a Docker image from scratch. This process should use the following swupd command to create the build context:

sudo -E swupd os-install --wait-for-scripts --path="$CHROOT_DIR" --version="$VER" --statedir="$STATE_DIR" --format="$(< "$SWUPDWEBDIR/$VER/format")" --url=file://"$SWUPDWEBDIR" --no-boot-update --bundles "$(cat "$TYPE_BUNDLE_FILE" | tr '\n' ',' | sed 's/,$//')"
gtkramer commented 4 years ago

We may want to consider implementing this in a way that closes https://github.com/clearlinux/docker-brew-clearlinux/issues/2

sysarcher commented 4 years ago

@gtkramer The issue you mentioned came up on my notifications today because someone commented there. I noticed that the repo size is almost 2Gigs now.

We shouldn't need to download 2Gigs for such a small repo. Maybe consider using LFS? (https://help.github.com/en/github/managing-large-files/versioning-large-files)

Best would be to use the ADD keyword with a URL to where the base.tar.xz is found.

gtkramer commented 4 years ago

I think we want to move away from storing the base.tar.xz in a git repo all together, since there's not a compelling reason for us to do this except for out of convenience for our build and publishing process. As you recommended, we'd probably do this using the ADD keyword and then publishing a docker image alongside our other images that sit on our CDN. We'd then remove the base.tar.xz from our git repo and make sure the history of it is gone too so the repo clone is pretty small and fast.