mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-09-20 20:33:31 +00:00
Implement package build, push and show-tag in linuxkit tool
This implements the proposal in #2564 and converts a handful of representative or especially interesting (from a build PoV) packages to use it. For now those pkg/* affected get a stub-`Makefile`, once all packages are converted then `pkg/Makefile` can be adjusted and those stubs can be removed. For now only `pkg/package.mk`'s functionality is implemented. In particular: - `push-manifest.sh` remains a separate script, to enable calling it on systems with just the LinuxKit tools installed arrange to install it under a less generic name. - `kernel` and `tools/alpine` do not use `pkg/package.mk` and those cases are not yet fully considered/covered. I have updated the documentation assuming that the existing uses of `pkg/package.mk` will be removed quite soon in a follow up PR rather than trying to document the situation which results after just this commit. Due to `cmd/linuxkit` now gaining a library the build needs adjusting slightly to allow both `make bin/linuxkit` and `go build` to work. `go vet` has forced me to write some rather asinine comments for things that are rather obvious from the name. Signed-off-by: Ian Campbell <ijc@docker.com>
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
DIRS = $(shell find . -maxdepth 1 -mindepth 1 -type d)
|
||||
.PHONY: clean dirs $(DIRS)
|
||||
|
||||
# TODO(ijc) once all switch to `linuxkit pkg` update this to:
|
||||
# linuxkit pkg <build|push> [--force] $$d
|
||||
# linuxkit pkg show-tag $$d
|
||||
|
||||
push:
|
||||
@set -e; for d in $(DIRS); do make -C "$$d"; done
|
||||
|
||||
|
@@ -1,4 +1,16 @@
|
||||
IMAGE?=auditd
|
||||
NETWORK=1
|
||||
.PHONY: push forcepush tag forcetag show-tag
|
||||
|
||||
include ../package.mk
|
||||
push:
|
||||
linuxkit pkg push .
|
||||
|
||||
forcepush:
|
||||
linuxkit pkg push --force .
|
||||
|
||||
tag:
|
||||
linuxkit pkg build .
|
||||
|
||||
forcetag:
|
||||
linuxkit pkg build --force .
|
||||
|
||||
show-tag:
|
||||
linuxkit pkg show-tag .
|
||||
|
2
pkg/auditd/build.yml
Normal file
2
pkg/auditd/build.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
image: auditd
|
||||
network: true
|
@@ -1,5 +1,16 @@
|
||||
IMAGE=binfmt
|
||||
DEPS=main.go $(wildcard etc/binmft.d/*)
|
||||
ARCHES=x86_64
|
||||
.PHONY: push forcepush tag forcetag show-tag
|
||||
|
||||
include ../package.mk
|
||||
push:
|
||||
linuxkit pkg push .
|
||||
|
||||
forcepush:
|
||||
linuxkit pkg push --force .
|
||||
|
||||
tag:
|
||||
linuxkit pkg build .
|
||||
|
||||
forcetag:
|
||||
linuxkit pkg build --force .
|
||||
|
||||
show-tag:
|
||||
linuxkit pkg show-tag .
|
||||
|
3
pkg/binfmt/build.yml
Normal file
3
pkg/binfmt/build.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
image: binfmt
|
||||
arches:
|
||||
- amd64
|
@@ -1,4 +1,16 @@
|
||||
IMAGE=init
|
||||
DEPS=usermode-helper.c $(wildcard etc/*) $(wildcard etc/init.d/*) $(shell find cmd -type f)
|
||||
.PHONY: push forcepush tag forcetag show-tag
|
||||
|
||||
include ../package.mk
|
||||
push:
|
||||
linuxkit pkg push .
|
||||
|
||||
forcepush:
|
||||
linuxkit pkg push --force .
|
||||
|
||||
tag:
|
||||
linuxkit pkg build .
|
||||
|
||||
forcetag:
|
||||
linuxkit pkg build --force .
|
||||
|
||||
show-tag:
|
||||
linuxkit pkg show-tag .
|
||||
|
1
pkg/init/build.yml
Normal file
1
pkg/init/build.yml
Normal file
@@ -0,0 +1 @@
|
||||
image: init
|
Reference in New Issue
Block a user