mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-10-05 13:34:19 +00:00
This updates the build of the two image caches to use the `pkg/package.mk` infrastructure, albeit in a slightly (ok, very) atypical way. In order to share the bulk of the build code (including the `Dockerfile` and the `Makefile` machinery to download the images) we arrange for the necessary bits to be copied at build time into distinct subdirectories and for the `pkg/package.mk` to be aware of this possibility. Since pkg/package.mk is only set up to build a single package we use a single `image-cache/Makefile` to drive the whole process and recurse into `Makefile.pkg` to build individual packages. One particular subtlety is that the package hash is based on the `image-cache` directory (which is in `git`) rather than the generated subdirectories (which are not in `git`). Since all the generators (and their inputs) are in the `image-cache` directory this is what we want. This means that the two images are given the same tag, but this is deliberate and desirable. The generated directories are completely temporary to avoid picking up stale versions of images when versions are updated. Images are hardlinked into place. The images are moved to the linuxkitprojects org. Using a dev tag for now, will update once everything is in place. Also use "tag" rather than "build" where appropriate in the Makefile. There is no point in the .dockerignore now, but add a .gitignore. Signed-off-by: Ian Campbell <ijc@docker.com>
11 lines
196 B
Makefile
11 lines
196 B
Makefile
ORG?=linuxkitprojects
|
|
IMAGE=kubernetes-image-cache-$(CACHE)
|
|
NOTRUST=1
|
|
SOURCE=$(BUILDDIR)
|
|
DEPS=$(BUILDDIR)/Dockerfile
|
|
|
|
$(BUILDDIR)/Dockerfile: Dockerfile
|
|
cp $< $@
|
|
|
|
include ../../../pkg/package.mk
|