clr-distro-factory icon indicating copy to clipboard operation
clr-distro-factory copied to clipboard

Create a Docker image from scratch

Open gtkramer opened this issue 5 years ago • 3 comments

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:

  • Dockerfile
  • bundles (contains one bundle name per line in the file)
  • contact (one line in the format ",," without quotes

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 avatar Nov 01 '19 17:11 gtkramer

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

gtkramer avatar Dec 20 '19 21:12 gtkramer

@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.

sysarcher avatar Feb 18 '20 12:02 sysarcher

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.

gtkramer avatar Mar 04 '20 20:03 gtkramer