255 Commits

Author SHA1 Message Date
Justin Cormack
4cfb70d3cc Merge pull request #4207 from europaul/fix/load-files-into-container
pkg build: fix builder config and certs not copied into new containers
2026-03-18 18:08:17 +00:00
Paul Gaiduk
3751bb6d79 pkg build: fix builder config and certs not copied into new containers
LoadConfigFiles() was only called inside the container-inspect block,
so filesToLoadIntoContainer was never populated when no builder
container existed yet. The subsequent copyFilesToContainer() call
received a nil map, sending an empty tar archive and leaving
/etc/buildkit/ empty inside the newly created container.

Move the LoadConfigFiles() call before the inspect check so the config
and certificate data is always available when creating a fresh builder.

Co-Authored-By: Claude <noreply@anthropic.com>

Signed-off-by: Paul Gaiduk <paulg@zededa.com>
2026-03-12 20:28:03 +01:00
Justin Cormack
bdef7e865a Merge pull request #4205 from rucoder/rucoder/env-vars-for-ci
pkg build: add env var support for mirror, org, builder image and config
2026-03-12 11:42:30 +00:00
Mikhail Malyshev
666bbfdbd5 pkg build: add env var support for mirror, org, builder image and config
Introduce environment variables for key CI/CD flags so that self-hosted
runners (e.g. GitHub Actions) can configure registry mirrors and push
targets without modifying calling Makefiles:

- LINUXKIT_MIRROR         - equivalent to --mirror (space/comma-separated);
                            CLI flags take precedence (last SetProxy wins)
- LINUXKIT_PKG_ORG        - equivalent to --org for all pkg subcommands
- LINUXKIT_BUILDER_IMAGE  - equivalent to --builder-image
- LINUXKIT_BUILDER_CONFIG - equivalent to --builder-config

All env var constants are consolidated in pkg_build.go alongside the
existing LINUXKIT_CACHE, LINUXKIT_BUILDER_NAME, LINUXKIT_BUILDERS.

Priority for all: CLI flag > env var > built-in default

Adds a new Environment Variables section to docs/packages.md with a
reference table covering all LINUXKIT_* vars and a note explaining the
two-layer mirror configuration required in CI (linuxkit pulls vs
buildkit Dockerfile pulls).

Signed-off-by: Roman Shaposhnik <rucoder@gmail.com>
Signed-off-by: Mikhail Malyshev <mike.malyshev@gmail.com>
2026-03-12 10:48:39 +00:00
Justin Cormack
c766f572ce Merge pull request #4204 from rucoder/rucoder/per-user-builder-name
pkg build: make buildkit builder container name configurable
2026-03-12 10:27:40 +00:00
Mikhail Malyshev
72a76e5b79 pkg build: use named volume to persist buildkit cache across restarts
The moby/buildkit image declares VOLUME /var/lib/buildkit, which causes
Docker to create an anonymous volume when no explicit mount is given.
These anonymous volumes are orphaned every time the builder container is
recreated (--builder-restart, config change, privilege fix), leaking
disk space.

Switch to a named volume (<builder-name>-state) that is explicitly
mounted on container creation. This:

- Preserves build cache across container restarts, config changes, and
  privilege fixes, making rebuilds faster.
- Eliminates anonymous volume leaks.
- Removes the state volume when the builder image version changes, since
  buildkit state compatibility across versions is not guaranteed.

Signed-off-by: Mikhail Malyshev <mike.malyshev@gmail.com>
2026-03-07 13:29:37 +00:00
Mikhail Malyshev
a85160e4d6 pkg build: make buildkit builder container name configurable
On shared servers where multiple users build packages against the same
Docker daemon, all users fight over a single hardcoded builder container
named "linuxkit-builder". One user's build can destroy another's
in-flight build when builder lifecycle management detects mismatches.

Make the builder container name configurable:

1. --builder-name CLI flag (highest priority)
2. LINUXKIT_BUILDER_NAME environment variable
3. "linuxkit-builder" default (original behavior, unchanged)

The flag is available on both "linuxkit pkg build" and
"linuxkit pkg builder" (du/prune) commands. Users on shared servers
can set LINUXKIT_BUILDER_NAME or pass --builder-name to get per-user
isolation (e.g. LINUXKIT_BUILDER_NAME=linuxkit-builder-$USER).

Signed-off-by: Mikhail Malyshev <mike.malyshev@gmail.com>
2026-03-07 12:58:36 +00:00
Mikhail Malyshev
ccb0787e2a pkg build: refactor builder parameters into BuilderConfig struct
Group the four builder-related fields (name, image, config path, restart)
that always travel together into a BuilderConfig struct. This simplifies:

- DockerRunner interface (Build() and Builder() lose 3 params each)
- buildOpts struct (4 fields -> 1)
- buildArch() function signature (3 fewer params)
- DiskUsage() / PruneBuilder() / getClientForPlatform() signatures
- 4 WithBuildBuilder*() option functions -> 1 WithBuildBuilderConfig()

Also rename the confusingly-named "builderName" local variables in
buildArch() and getClientForPlatform() to "dockerContext", which better
reflects their actual purpose (they hold a Docker context name, not the
builder container name).

No behavioral changes.

Signed-off-by: Mikhail Malyshev <mike.malyshev@gmail.com>
2026-02-26 08:20:01 +00:00
Avi Deitcher
e0151386c8 bump buildkit version and deps (#4202)
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2026-01-18 14:32:24 +02:00
Avi Deitcher
4129cc7999 push release tags even when digest tag already is there (#4201)
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2026-01-15 20:01:04 +02:00
Avi Deitcher
367e1f832a update images.yaml for raw-efi (#4198)
* update images.yaml for raw-efi

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* Fix mkimage-raw-efi script

Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
Signed-off-by: Avi Deitcher <avi@deitcher.net>

---------

Signed-off-by: Avi Deitcher <avi@deitcher.net>
Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
Co-authored-by: Chris Irrgang <chris.irrgang@gmx.de>
2026-01-14 12:08:16 +02:00
Avi Deitcher
7c7ac4e640 runc enable GO111MODULE (#4195)
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-12-11 21:07:29 +02:00
Chris Irrgang
50025b8840 separate kernel series hashing (#4194)
* separate kernel series hashing

Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>

* fix issues with the update component sha script

- add bsd/gnu cross compatibility for sed
- also replace in */test.sh files
- replace potentially problematic xargs
- remove potentially problematic word boundary \b

Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>

* Move common kernel files to dedicated folder

Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>

* run update-kernel-yamls

Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>

---------

Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
2025-12-11 21:06:47 +02:00
Chris Irrgang
62c4fdb3d7 fix remaining two files for 6.12.59 kernel update
Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
2025-12-11 15:57:11 +02:00
Chris Irrgang
a066b29c1d fix remaining two files for 6.6.71 kernel hash update
Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
2025-12-11 15:57:11 +02:00
Chris Irrgang
fe86d9c345 update 6.6.71 kernel hashes after manual image registry fix
Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
2025-12-11 15:57:11 +02:00
Chris Irrgang
5fd23cf059 update kernel yamls
Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
2025-12-11 15:57:11 +02:00
Chris Irrgang
f935f6b18c bump kernel to 6.12.59
Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
2025-12-11 15:57:11 +02:00
Chris Irrgang
2ffdb936ad enable kernel vmware vmci support
Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
2025-12-11 15:57:11 +02:00
Avi Deitcher
c4e3043089 update qemu to solve slow builds using qemu binfmt
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-12-05 09:45:42 +02:00
Avi Deitcher
a2753b8da3 remove unnecessary apkdb from final package for memlogd and runc
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-12-03 12:08:42 +02:00
Avi Deitcher
cde127790c remove unnecessary apk package info from sysctl package
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-12-02 18:29:34 +02:00
Avi Deitcher
478807bd58 bump runc v3.3.0
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-11-18 12:30:46 -05:00
Avi Deitcher
2dd1217392 bump containerd v2.2.0
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-11-18 12:30:46 -05:00
Chris Irrgang
56e37a842e Add raw-efi test + documentation
Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
2025-11-09 04:36:36 -05:00
Chris Irrgang
804d52374e Switch to systemd-boot for raw-efi builds
Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
2025-11-09 04:36:36 -05:00
Avi Deitcher
238449c2d6 more package hash updates
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-10-29 07:10:30 -04:00
Avi Deitcher
e9114d690c fix missing containerd-dev
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-10-29 07:10:30 -04:00
Avi Deitcher
f5c8db72f4 update images.yaml
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-10-29 07:10:30 -04:00
Avi Deitcher
f73fa3b088 update tools based on grub
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-10-29 07:10:30 -04:00
Avi Deitcher
91a857dbfc sanity check on images.yaml
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-10-29 07:10:30 -04:00
Avi Deitcher
8fa6ab79b6 revert rpi3 build change
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-10-29 07:10:30 -04:00
Avi Deitcher
1723cf9493 Update package tags
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-10-29 07:10:30 -04:00
Avi Deitcher
6786caa59b tests: Update tests cases to the latest linuxkit/alpine
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-10-29 07:10:30 -04:00
Chris Irrgang
72de5c6476 Update package tags
Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
2025-10-29 07:10:30 -04:00
Chris Irrgang
38c84d8c3c pkgs: Update packages to the latest linuxkit/alpine
Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
2025-10-29 07:10:30 -04:00
Chris Irrgang
c56bc379e6 Update use of test packages to latest
Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
2025-10-29 07:10:30 -04:00
Chris Irrgang
7dfbca36c7 tests: Update packages to the latest linuxkit/alpine
Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
2025-10-29 07:10:30 -04:00
Chris Irrgang
315cead648 Update use of tools to latest
Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
2025-10-29 07:10:30 -04:00
Chris Irrgang
35ab913bfb tools: Update to the latest linuxkit/alpine
Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
2025-10-29 07:10:30 -04:00
Chris Irrgang
397d7c2943 Add systemd-boot to alpine
Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
2025-10-29 07:10:30 -04:00
Chris Irrgang
5673ee1bfb Update kernel config test hashes
Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
2025-10-26 14:09:16 +02:00
Chris Irrgang
dadefbc5eb Fix kernel config test for 6.12.x
Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
2025-10-26 14:09:16 +02:00
Chris Irrgang
5f0b5f292e Update remaining hashes in tests manually
Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
2025-10-26 14:09:16 +02:00
Chris Irrgang
17e9b4412b Update kernel versions/hashes
Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
2025-10-26 14:09:16 +02:00
Chris Irrgang
ffd4a12ba2 Enable CONFIG_INET_DIAG_DESTROY
GH-4167

Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
2025-10-26 14:09:16 +02:00
Chris Irrgang
c5d422c9d7 Fix kernel show-tags output
Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
2025-10-26 14:09:16 +02:00
Chris Irrgang
07231ef799 Add new kernel tests
Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
2025-10-26 14:09:16 +02:00
Chris Irrgang
2e3df6e42b Configure EIF boot/stub
Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
2025-10-26 14:09:16 +02:00
Chris Irrgang
1200d24201 Add kernel apparmor support
Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
2025-10-26 14:09:16 +02:00
Chris Irrgang
be7c483e17 Create new kernel series 6.12.x
Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
2025-10-26 14:09:16 +02:00
Paul Gaiduk
d94f2e9095 Fix Go formatting issues to pass make local-check
Applied gofmt -s -w to fix formatting issues in pkglib/build.go that
were causing the make local-check target to fail during the gofmt step.

Signed-off-by: Paul Gaiduk <paulg@zededa.com>
2025-10-03 12:35:12 +03:00
Paul Gaiduk
47d5c89132 Fix cache import failing when reading from stdin
The cache import command was not properly handling stdin input,
treating "-" as filename, causing failures when piping data.
This commit fixes the stdin handling logic.

Signed-off-by: Paul Gaiduk <paulg@zededa.com>
2025-10-03 12:35:12 +03:00
Avi Deitcher
a8cf7dabec fix build when pulling from non-default registry
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-09-25 13:47:38 +03:00
Avi Deitcher
4c81a1408b do full releases, not draft
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-09-16 16:34:22 +03:00
Christoph Ostarek
43200ea634 pkglib: untangle WithBuildDocker and DryRun
this makes it possible for a user of this API to
build their own DryRunner

also make newDockerRunner public as well to be consistent

Signed-off-by: Christoph Ostarek <christoph@zededa.com>
2025-09-15 15:49:40 +03:00
Christoph Ostarek
bb0cf49975 pkglib/build: make dockerRunner public
there is already a public method "WithBuildDocker",
so it makes sense that the parameter definition is public as well
so that a user of this method can actually use it

Signed-off-by: Christoph Ostarek <christoph@zededa.com>
2025-09-15 15:49:40 +03:00
Avi Deitcher
2ed6850397 when comparing builder config files, ensure only compare post-processed
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-09-14 10:20:55 +03:00
Avi Deitcher
a755fd917d validate linuxkit yaml for unknown fields
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-09-05 15:12:54 +02:00
Avi Deitcher
358803fcc7 validate yaml for extraneous fields in pkg build
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-09-05 15:12:54 +02:00
Christoph Ostarek
9da6903609 cache/provider: use lock correctly
even checking if the file-lock object is non-nil needs
to be guarded with the lock

`go test -race` output:
```
==================
WARNING: DATA RACE
Read at 0x00c0005283f0 by goroutine 17:
  github.com/linuxkit/linuxkit/src/cmd/linuxkit/cache.(*Provider).Lock()
      /home/runner/go/pkg/mod/github.com/linuxkit/linuxkit/src/cmd/linuxkit@v0.0.0-20250829112740-179f74ac245b/cache/provider.go:57 +0x55
  github.com/linuxkit/linuxkit/src/cmd/linuxkit/cache.(*Provider).Index()
      /home/runner/go/pkg/mod/github.com/linuxkit/linuxkit/src/cmd/linuxkit@v0.0.0-20250829112740-179f74ac245b/cache/provider.go:47 +0x47
  github.com/linuxkit/linuxkit/src/cmd/linuxkit/cache.(*Provider).FindDescriptor()
      /home/runner/go/pkg/mod/github.com/linuxkit/linuxkit/src/cmd/linuxkit@v0.0.0-20250829112740-179f74ac245b/cache/find.go:86 +0x46
  github.com/linuxkit/linuxkit/src/cmd/linuxkit/pkglib.(*dockerRunnerImpl).build()
      /home/runner/go/pkg/mod/github.com/linuxkit/linuxkit/src/cmd/linuxkit@v0.0.0-20250829112740-179f74ac245b/pkglib/dockerimpl.go:683 +0x2a90
  github.com/linuxkit/linuxkit/src/cmd/linuxkit/pkglib.(*dockerRunnerImpl).builder()
      /home/runner/go/pkg/mod/github.com/linuxkit/linuxkit/src/cmd/linuxkit@v0.0.0-20250829112740-179f74ac245b/pkglib/dockerimpl.go:245 +0x748
  github.com/linuxkit/linuxkit/src/cmd/linuxkit/pkglib.(*dockerRunnerImpl).build()
      /home/runner/go/pkg/mod/github.com/linuxkit/linuxkit/src/cmd/linuxkit@v0.0.0-20250829112740-179f74ac245b/pkglib/dockerimpl.go:507 +0xec
  github.com/linuxkit/linuxkit/src/cmd/linuxkit/pkglib.Pkg.buildArch()
      /home/runner/go/pkg/mod/github.com/linuxkit/linuxkit/src/cmd/linuxkit@v0.0.0-20250829112740-179f74ac245b/pkglib/build.go:718 +0x13cf
  github.com/linuxkit/linuxkit/src/cmd/linuxkit/pkglib.Pkg.Build()
      /home/runner/go/pkg/mod/github.com/linuxkit/linuxkit/src/cmd/linuxkit@v0.0.0-20250829112740-179f74ac245b/pkglib/build.go:495 +0x4b64
  bpftrace-compiler.(*imageBuilder).buildPkgs()
      /home/runner/work/eve/eve/eve-tools/bpftrace-compiler/pkgbuild.go:150 +0xf2d
  path/filepath.walkDir()
      /opt/hostedtoolcache/go/1.24.6/x64/src/path/filepath/path.go:332 +0x39e
  path/filepath.walkDir()
      /opt/hostedtoolcache/go/1.24.6/x64/src/path/filepath/path.go:332 +0x39e
  path/filepath.walkDir()
      /opt/hostedtoolcache/go/1.24.6/x64/src/path/filepath/path.go:310 +0x84
  path/filepath.walkDir()
      /opt/hostedtoolcache/go/1.24.6/x64/src/path/filepath/path.go:332 +0x39e
  path/filepath.walkDir()
      /opt/hostedtoolcache/go/1.24.6/x64/src/path/filepath/path.go:310 +0x84
  path/filepath.walkDir()
      /opt/hostedtoolcache/go/1.24.6/x64/src/path/filepath/path.go:332 +0x39e
  path/filepath.walkDir()
      /opt/hostedtoolcache/go/1.24.6/x64/src/path/filepath/path.go:310 +0x84
  path/filepath.walkDir()
      /opt/hostedtoolcache/go/1.24.6/x64/src/path/filepath/path.go:332 +0x39e
  path/filepath.walkDir()
      /opt/hostedtoolcache/go/1.24.6/x64/src/path/filepath/path.go:332 +0x39e
  path/filepath.walkDir()
      /opt/hostedtoolcache/go/1.24.6/x64/src/path/filepath/path.go:310 +0x84
  path/filepath.walkDir()
      /opt/hostedtoolcache/go/1.24.6/x64/src/path/filepath/path.go:332 +0x39e
  path/filepath.WalkDir()
      /opt/hostedtoolcache/go/1.24.6/x64/src/path/filepath/path.go:400 +0x89
  bpftrace-compiler.hashDir()
      /home/runner/work/eve/eve/eve-tools/bpftrace-compiler/util.go:103 +0x2ae
  bpftrace-compiler.(*imageBuilder).buildPkgs()
      /home/runner/work/eve/eve/eve-tools/bpftrace-compiler/pkgbuild.go:96 +0x144
  bpftrace-compiler.TestCreateMobyConfig()
      /home/runner/work/eve/eve/eve-tools/bpftrace-compiler/pkgbuild_test.go:14 +0x26f
  testing.tRunner()
      /opt/hostedtoolcache/go/1.24.6/x64/src/testing/testing.go:1792 +0x225
  testing.(*T).Run.gowrap1()
      /opt/hostedtoolcache/go/1.24.6/x64/src/testing/testing.go:1851 +0x44
Previous write at 0x00c0005283f0 by goroutine 65:
  github.com/linuxkit/linuxkit/src/cmd/linuxkit/cache.(*Provider).Lock()
      /home/runner/go/pkg/mod/github.com/linuxkit/linuxkit/src/cmd/linuxkit@v0.0.0-20250829112740-179f74ac245b/cache/provider.go:67 +0x2da
  github.com/linuxkit/linuxkit/src/cmd/linuxkit/cache.(*Provider).ImageLoad()
      /home/runner/go/pkg/mod/github.com/linuxkit/linuxkit/src/cmd/linuxkit@v0.0.0-20250829112740-179f74ac245b/cache/write.go:157 +0x279
  github.com/linuxkit/linuxkit/src/cmd/linuxkit/pkglib.Pkg.buildArch.func2()
      /home/runner/go/pkg/mod/github.com/linuxkit/linuxkit/src/cmd/linuxkit@v0.0.0-20250829112740-179f74ac245b/pkglib/build.go:697 +0x86
  golang.org/x/sync/errgroup.(*Group).Go.func1()
      /home/runner/go/pkg/mod/golang.org/x/sync@v0.16.0/errgroup/errgroup.go:93 +0x91
Goroutine 17 (running) created at:
  testing.(*T).Run()
      /opt/hostedtoolcache/go/1.24.6/x64/src/testing/testing.go:1851 +0x8f2
  testing.runTests.func1()
      /opt/hostedtoolcache/go/1.24.6/x64/src/testing/testing.go:2279 +0x85
  testing.tRunner()
      /opt/hostedtoolcache/go/1.24.6/x64/src/testing/testing.go:1792 +0x225
  testing.runTests()
      /opt/hostedtoolcache/go/1.24.6/x64/src/testing/testing.go:2277 +0x96c
  testing.(*M).Run()
      /opt/hostedtoolcache/go/1.24.6/x64/src/testing/testing.go:2142 +0xeea
  main.main()
      _testmain.go:69 +0x164
Goroutine 65 (running) created at:
  golang.org/x/sync/errgroup.(*Group).Go()
      /home/runner/go/pkg/mod/golang.org/x/sync@v0.16.0/errgroup/errgroup.go:78 +0x124
  github.com/linuxkit/linuxkit/src/cmd/linuxkit/pkglib.Pkg.buildArch()
      /home/runner/go/pkg/mod/github.com/linuxkit/linuxkit/src/cmd/linuxkit@v0.0.0-20250829112740-179f74ac245b/pkglib/build.go:696 +0xb05
  github.com/linuxkit/linuxkit/src/cmd/linuxkit/pkglib.Pkg.Build()
      /home/runner/go/pkg/mod/github.com/linuxkit/linuxkit/src/cmd/linuxkit@v0.0.0-20250829112740-179f74ac245b/pkglib/build.go:495 +0x4b64
  bpftrace-compiler.(*imageBuilder).buildPkgs()
      /home/runner/work/eve/eve/eve-tools/bpftrace-compiler/pkgbuild.go:150 +0xf2d
  path/filepath.walkDir()
      /opt/hostedtoolcache/go/1.24.6/x64/src/path/filepath/path.go:332 +0x39e
  path/filepath.walkDir()
      /opt/hostedtoolcache/go/1.24.6/x64/src/path/filepath/path.go:332 +0x39e
  path/filepath.walkDir()
      /opt/hostedtoolcache/go/1.24.6/x64/src/path/filepath/path.go:310 +0x84
  path/filepath.walkDir()
      /opt/hostedtoolcache/go/1.24.6/x64/src/path/filepath/path.go:332 +0x39e
  path/filepath.walkDir()
      /opt/hostedtoolcache/go/1.24.6/x64/src/path/filepath/path.go:310 +0x84
  path/filepath.walkDir()
      /opt/hostedtoolcache/go/1.24.6/x64/src/path/filepath/path.go:332 +0x39e
  path/filepath.walkDir()
      /opt/hostedtoolcache/go/1.24.6/x64/src/path/filepath/path.go:310 +0x84
  path/filepath.walkDir()
      /opt/hostedtoolcache/go/1.24.6/x64/src/path/filepath/path.go:332 +0x39e
  path/filepath.walkDir()
      /opt/hostedtoolcache/go/1.24.6/x64/src/path/filepath/path.go:332 +0x39e
  path/filepath.walkDir()
      /opt/hostedtoolcache/go/1.24.6/x64/src/path/filepath/path.go:310 +0x84
  path/filepath.walkDir()
      /opt/hostedtoolcache/go/1.24.6/x64/src/path/filepath/path.go:332 +0x39e
  path/filepath.WalkDir()
      /opt/hostedtoolcache/go/1.24.6/x64/src/path/filepath/path.go:400 +0x89
  bpftrace-compiler.hashDir()
      /home/runner/work/eve/eve/eve-tools/bpftrace-compiler/util.go:103 +0x2ae
  bpftrace-compiler.(*imageBuilder).buildPkgs()
      /home/runner/work/eve/eve/eve-tools/bpftrace-compiler/pkgbuild.go:96 +0x144
  bpftrace-compiler.TestCreateMobyConfig()
      /home/runner/work/eve/eve/eve-tools/bpftrace-compiler/pkgbuild_test.go:14 +0x26f
  testing.tRunner()
      /opt/hostedtoolcache/go/1.24.6/x64/src/testing/testing.go:1792 +0x225
  testing.(*T).Run.gowrap1()
      /opt/hostedtoolcache/go/1.24.6/x64/src/testing/testing.go:1851 +0x44
==================
```

Signed-off-by: Christoph Ostarek <christoph@zededa.com>
2025-09-03 11:04:39 +03:00
christoph-zededa
179f74ac24 pkglib/git: remove trailing spaces of GOPKGVERSION (#4164)
this makes `--dry-run` inconvenient as it includes a newline

Signed-off-by: Christoph Ostarek <christoph@zededa.com>
2025-08-29 14:27:40 +03:00
Avi Deitcher
41cafa3cc3 bump runc to v1.3.0 and containerd to v2.1.4 (#4165)
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-08-28 21:05:06 +03:00
Avi Deitcher
8d19b25408 add support for pkg build dry-run (#4163)
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-08-28 13:35:52 +03:00
Avi Deitcher
c3228fb526 erofs output (#4162)
* add erofs as output option

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* unify nearly identical functions

Signed-off-by: Avi Deitcher <avi@deitcher.net>

---------

Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-08-28 10:34:53 +03:00
Avi Deitcher
506d11f06d bump alpine; add erofs-utils package (#4161)
* bump alpine to 3.22; include erofs-utils

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* tools/alpine: Update to latest

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* tools: Update to the latest linuxkit/alpine

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* Update use of tools to latest

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* Update use of test packages to latest

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* pkgs: Update packages to the latest linuxkit/alpine

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* Update package tags

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* fix scaleway error

Signed-off-by: Avi Deitcher <avi@deitcher.net>

---------

Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-08-27 19:07:26 +03:00
Avi Deitcher
5cd48735d5 update debian for binfmt (#4159)
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-08-14 16:35:56 +03:00
Avi Deitcher
cacc2bbb8e simplify sharding in package tests for CI; increase to 12 shards (#4158)
* simplify sharding in package tests for CI; increase to 12 shards

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* for CI setup-go action, determine it based on go.mod file

Signed-off-by: Avi Deitcher <avi@deitcher.net>

---------

Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-08-13 16:02:36 +03:00
Avi Deitcher
999110c6de add support for dynamically calculated build arg sets (#4156) 2025-08-13 12:33:52 +03:00
Avi Deitcher
1caf2feffc add support for custom build args (#4155)
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-08-11 11:58:17 +03:00
Avi Deitcher
3d9bb9a128 add support for specifying additional certificates (#4153)
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-07-31 19:36:10 +03:00
Avi Deitcher
1d3a8235a9 option to pull down required images from to the cache, so that buildkit never gets them over the network (#4149)
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-07-27 19:07:20 +03:00
Avi Deitcher
ef68e7bcd5 provide mirror support (#4148)
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-07-27 19:06:36 +03:00
Avi Deitcher
eae788724a check lock when reading cache provider index (#4147)
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-07-21 22:14:59 +02:00
Avi Deitcher
bc44cb899c fix registry auth (#4146)
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-07-15 14:07:20 +03:00
Avi Deitcher
33ee27971d for pkg build builder, copy config over rather than bind-mounting it (#4145)
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-07-13 21:18:00 +03:00
Avi Deitcher
fa246722e2 add missing CRLF in log message (#4144)
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-07-13 17:30:59 +03:00
Avi Deitcher
c0c5668116 swap 'pkg push' for 'pkg build --push', keeping 'pkg push' as deprecated but still working (#4141)
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-07-04 18:00:28 +03:00
Avi Deitcher
2b4687338b add support for pkg build authentication (#4137)
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-07-02 18:52:05 +03:00
Avi Deitcher
940c1b7b3b simplify cache locking (#4136)
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-06-30 20:58:50 +03:00
Daniel S.
818bccf20f docs: Add instructions for OCI export from Docker (#4135)
Signed-off-by: Daniel Smith <daniel@razorsecure.com>
2025-06-30 16:27:54 +03:00
Avi Deitcher
50120bce2d ensure that new index does not break on missing lock file (#4134)
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-06-27 11:01:43 +03:00
Avi Deitcher
254aefc953 check for dirty tree without update-index, which is not parallel-safe (#4133)
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-06-26 19:53:13 +03:00
Avi Deitcher
4df360d62d Centralize safe cache writes (#4132)
* centralize all writing of the index.json to one place

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* create filelock utility

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* leverage file locks for cache index.json

Signed-off-by: Avi Deitcher <avi@deitcher.net>

---------

Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-06-26 19:02:49 +03:00
christoph-zededa
3f54a80824 git: synchronize update-index with a mutex (#4130)
if `pkglib.NewFromConfig` is used in parallel, it calls
```
git -C /some/directory update-index -q --refresh
```
in parallel.

But `git` does not like this and exits with 128.

This can be easily tried with:
```
git -C /some/dir update-index -q --refresh & \
git -C /some/dir update-index -q --refresh
```

Signed-off-by: Christoph Ostarek <christoph@zededa.com>
2025-06-25 21:59:47 +03:00
Avi Deitcher
d45d3e8c6e more builder race condition; do restart if could not remove, and only go via container ID (#4129)
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-06-25 21:21:51 +03:00
Avi Deitcher
5a13eda661 Bump buildkit (#4128)
* bump buildkit to v0.23.1

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* bump buldkit library and deps to v0.23.1

Signed-off-by: Avi Deitcher <avi@deitcher.net>

---------

Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-06-25 14:07:15 +03:00
Avi Deitcher
18a76198dd pkg build: handle race condition where builder is started at same time (#4127)
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-06-25 10:09:46 +03:00
Carsten Munk
b42e1a8bab feat: add riscv64 as supported arch (#4124)
this makes kernel+squashfs flow work for risc64

Signed-off-by: Carsten Munk <carsten@zippie.com>
2025-06-23 12:21:59 +03:00
Avi Deitcher
89a95f958e when updating an index, remove sboms or other manifests that reference unknown digests (#4117)
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-05-02 13:56:37 +03:00
Avi Deitcher
7a129b6e8d bump golangci-lint to v2.0.2 and update all lint issues (#4116)
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-04-09 17:53:20 +03:00
Chris Irrgang
ec70c1246f add efi_gop module to grub (#4113)
* add efi_gop module to grub

fixes #4075

Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>

* bump grub-dev package hash

Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>

* bump grub package hash

Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>

* bump mkimage hashes

Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>

---------

Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
2025-03-11 21:13:19 +02:00
Avi Deitcher
14c29db5c2 Containerd v2.0.3 (#4112)
* containerd to semver v2.0.3

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* containerd v2.0.3 plus commits to fix blkdiscard

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* update containerd-dev dependencies

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* updated pkg/init and pkg/containerd deps

Signed-off-by: Avi Deitcher <avi@deitcher.net>

---------

Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-03-06 17:12:07 +02:00
Avi Deitcher
198db9089f containerd 20 (#4100)
* bump containerd-dev to 2.0.2

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* update pkg/init libs to containerd-20

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* bump linuxkit CLI containerd deps to 20

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* update test/pkg/containerd to work with containerd v2.x tests

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* update containerd-dev deps

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* update pkg/init and pkg/containerd dependencies

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* update test/pkg/containerd deps

Signed-off-by: Avi Deitcher <avi@deitcher.net>

---------

Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-02-24 18:40:56 +02:00
Avi Deitcher
1d96f04934 Buildkit builder 0.20.0 (#4110)
* bump buildkit version to 0.20.0

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* update library dependency of buildkit to v0.20.0

Signed-off-by: Avi Deitcher <avi@deitcher.net>

---------

Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-02-23 17:51:21 +02:00
Avi Deitcher
5dbd8082fb bump golangci-lint-action (#4109)
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-02-23 16:40:29 +02:00
Avi Deitcher
2053d17564 Enable riscv64 default (#4108)
* include riscv64 in target architectures

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* add riscv64 to explicit packages

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* cadvisor update to v0.51.0 and support for riscv64

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* update tools based on latest

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* updated example dependencies of tools

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* bump all test cases and example alpine:3.19 to alpine:3.21

Signed-off-by: Avi Deitcher <avi@deitcher.net>

---------

Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-02-23 13:37:06 +02:00
Avi Deitcher
18e7eea86f riscv64 kernel (#4106)
* add riscv64 kernels to kernel/Makefile and kernel/Dockerfile.*, riscv64 kernel config, bump alpine version for kernel builds

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* update bcc to v0.32.0 to include needed fixes

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* bump kernel builder alpine base to version including llvm19

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* in kernel-bcc, automatically determine python path

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* in kernel-perf, suppress newer gcc errors

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* riscv path in kernel build was incorrect

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* remove bcc compilation from kernel

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* update usages of kernel/6.6.13 to kernel/6.6.71

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* next run of updating kernel config

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* update test dependencies on kernel hash version

Signed-off-by: Avi Deitcher <avi@deitcher.net>

---------

Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-02-21 11:10:35 +02:00
Avi Deitcher
efb139697e always tee test linuxkit run to tty, so if it gets stuck, we see why (#4107)
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-02-19 19:41:06 +02:00
Avi Deitcher
76b519705b Add alpine bcc tools (#4105)
* Update linuxkit/alpine

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* tools/alpine: Update to latest

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* tools: Update to the latest linuxkit/alpine

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* Update use of tools to latest

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* tests: Update packages to the latest linuxkit/alpine

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* Update use of test packages to latest

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* pkgs: Update packages to the latest linuxkit/alpine

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* Update package tags

Signed-off-by: Avi Deitcher <avi@deitcher.net>

---------

Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-02-17 11:12:49 +02:00
Chris Irrgang
7ac34a6aec pkg/extend fix panic for empty partition tables (#4101)
Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
2025-01-30 15:55:14 +02:00
Chris Irrgang
66ca00915a Try resizing all found devices (#4099)
* Try resizing all found devices

fixes #4098

Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>

* Update package tags of pkg/extend

Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>

---------

Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
2025-01-27 11:24:45 +02:00
Chris Irrgang
fd6839d0fe Fix raw efi build image size calculation (#4097)
fixes #4095

Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
2025-01-27 10:26:18 +02:00
Avi Deitcher
9398785bec Merge pull request #4094 from deitch/alpine-llvm-update
Update llvm in alpine and downstream
2025-01-15 21:36:39 +02:00
Avi Deitcher
fd778c4d95 Update use of test packages to latest
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-15 17:31:39 +02:00
Avi Deitcher
caf39bbfff Update use of tools to latest
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-15 17:31:19 +02:00
Avi Deitcher
53cb098008 add riscv64 to mkimage-qcow2-efi
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-15 17:25:31 +02:00
Avi Deitcher
da2988c634 Update use of test packages to latest
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-15 15:58:15 +02:00
Avi Deitcher
4aa891d564 Update use of tools to latest
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-15 15:58:01 +02:00
Avi Deitcher
5c2e62d2b9 Update package tags
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-15 14:59:47 +02:00
Avi Deitcher
ed42bcdd5e pkgs: Update packages to the latest linuxkit/alpine
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-15 14:59:27 +02:00
Avi Deitcher
f1117657eb Update use of test packages to latest
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-15 14:59:18 +02:00
Avi Deitcher
9b5742fe4b tests: Update packages to the latest linuxkit/alpine
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-15 14:59:10 +02:00
Avi Deitcher
d83a55fce3 Update use of tools to latest
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-15 14:59:08 +02:00
Avi Deitcher
084e2a08bc tools: Update to the latest linuxkit/alpine
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-15 14:58:59 +02:00
Avi Deitcher
bdda3d0ad3 tools/alpine: Update to latest
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-15 14:56:21 +02:00
Avi Deitcher
c4d88d66db Update linuxkit/alpine
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-15 14:41:33 +02:00
Avi Deitcher
5e3e7cc077 Merge pull request #4093 from deitch/unify-alpine-packages
add missing riscv64 packages
2025-01-12 11:06:35 +02:00
Avi Deitcher
95fcdc3fe0 node_exporter to v1.8.2
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-12 09:51:01 +02:00
Avi Deitcher
0b677673b5 Update package tags
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-10 10:56:54 +02:00
Avi Deitcher
3e2df7ec19 pkgs: Update packages to the latest linuxkit/alpine
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-10 10:56:32 +02:00
Avi Deitcher
0edde24ef6 Update use of test packages to latest
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-10 10:56:23 +02:00
Avi Deitcher
e625d0cdbc tests: Update packages to the latest linuxkit/alpine
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-10 10:56:15 +02:00
Avi Deitcher
68caa0b911 Update use of tools to latest
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-10 10:56:13 +02:00
Avi Deitcher
a7baaaa4cc tools: Update to the latest linuxkit/alpine
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-10 10:56:03 +02:00
Avi Deitcher
c7c3ab8c2a tools/alpine: Update to latest
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-10 10:55:17 +02:00
Avi Deitcher
7270857bdf Update linuxkit/alpine
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-10 10:40:27 +02:00
Avi Deitcher
b929f3b46a Merge pull request #4091 from deitch/remove-grub-dev
Add grub from alpine replacing our custom built grub, and build grub for riscv64
2025-01-09 11:56:09 +02:00
Avi Deitcher
df4d0c0d47 update built-in images in linuxkit cmd
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-09 11:08:02 +02:00
Avi Deitcher
0579188c33 Update package tags
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-08 20:54:27 +02:00
Avi Deitcher
810e3c1fa8 pkgs: Update packages to the latest linuxkit/alpine
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-08 20:54:08 +02:00
Avi Deitcher
6cbd483b5c Update use of test packages to latest
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-08 20:54:01 +02:00
Avi Deitcher
6f46c2060b tests: Update packages to the latest linuxkit/alpine
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-08 20:53:52 +02:00
Avi Deitcher
da5fefe094 Update use of tools to latest
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-08 20:53:50 +02:00
Avi Deitcher
48f5de7595 tools: Update to the latest linuxkit/alpine
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-08 20:53:40 +02:00
Avi Deitcher
89ed0f5089 remove grub-dev in favour of grub package
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-08 20:51:36 +02:00
Avi Deitcher
35ab64822d update alpine install docs with riscv64 and no grub-dev
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-08 19:37:04 +02:00
Avi Deitcher
1c11777daf tools/alpine: Update to latest
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-08 19:34:54 +02:00
Avi Deitcher
94d490235c Update linuxkit/alpine
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-08 19:25:21 +02:00
Avi Deitcher
cfdeb545b1 Merge pull request #4090 from deitch/alpine-321-with-riscv64
Alpine 321 with riscv64
2025-01-07 22:13:37 +02:00
Avi Deitcher
d1b42ca0a8 update example for tss
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-07 21:44:21 +02:00
Avi Deitcher
0db6e01134 bump alpine in some test cases
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-07 18:50:59 +02:00
Avi Deitcher
4e384a86a4 fix tss compilation with patches
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-07 18:50:59 +02:00
Avi Deitcher
4165491275 Update package tags
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-07 18:50:58 +02:00
Avi Deitcher
67d6dad48a pkgs: Update packages to the latest linuxkit/alpine
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-07 18:50:07 +02:00
Avi Deitcher
db23fd9056 Update use of test packages to latest
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-07 18:49:29 +02:00
Avi Deitcher
41ddfa054f tests: Update packages to the latest linuxkit/alpine
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-07 18:48:48 +02:00
Avi Deitcher
fb54321715 Update use of tools to latest
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-07 18:47:25 +02:00
Avi Deitcher
bd30821cbf tools: Update to the latest linuxkit/alpine
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-07 18:44:48 +02:00
Avi Deitcher
b7cc91e875 include riscv64 in push-manifest script
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-07 18:43:34 +02:00
Avi Deitcher
709a945207 tools/alpine: Update to latest
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-07 18:43:32 +02:00
Avi Deitcher
59c3f62102 Update linuxkit/alpine
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2025-01-07 13:22:39 +02:00
Avi Deitcher
dc8c6d5985 Merge pull request #4089 from deitch/tag-in-build-yml
support --tag in build.yml for packages
2024-12-23 18:00:06 +02:00
Avi Deitcher
4f765b5da0 support --tag in build.yml for packages
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-12-23 17:28:49 +02:00
Avi Deitcher
ad95c6fc2e Merge pull request #4085 from deitch/volume-image
additional volume support in building
2024-10-01 15:57:17 +03:00
Avi Deitcher
76f4802ccf additional volume support in building
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-10-01 15:27:55 +03:00
Avi Deitcher
e4d41061b6 Merge pull request #4084 from deitch/cache-platform-instead-of-arch
internal restructure to use explicit platform instead of implicit arch in cache
2024-10-01 15:14:21 +03:00
Avi Deitcher
81f0c3eff2 internal restructure to use explicit platform instead of implicit arch in cache
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-10-01 14:30:03 +03:00
Avi Deitcher
5e3f7dd9a5 Merge pull request #4083 from deitch/restructure-logging
restructure logging
2024-10-01 14:00:06 +03:00
Avi Deitcher
67e9e22a36 restructure logging
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-10-01 12:50:43 +03:00
Avi Deitcher
8556f024ef Merge pull request #4082 from kolyshkin/moby-cap
vendor: switch to moby/sys/capability
2024-10-01 11:07:29 +03:00
Kir Kolyshkin
da3be29998 vendor: switch to moby/sys/capability
github.com/moby/sys/capability is a fork of the (no longer maintained)
github.com/syndtr/gocapability package.

For changes since the fork took place, see
https://github.com/moby/sys/blob/main/capability/CHANGELOG.md

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2024-09-30 18:10:16 -07:00
Avi Deitcher
d7a6bc8899 Merge pull request #4077 from deitch/docker-bump
bump docker deps to v27.2.0
2024-09-08 13:00:19 +03:00
Avi Deitcher
2159aacb09 bump docker deps to v27.2.0
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-09-08 12:22:57 +03:00
Avi Deitcher
fa3207c86e Merge pull request #4072 from christoph-zededa/docker_cache_consider_architecture
moby: check architecture for docker image
2024-08-29 22:15:19 +03:00
Avi Deitcher
1d6d5fa612 Merge pull request #4074 from deitch/efi-kernel
remove linuxefi grub EFI handover to normal linux loading
2024-08-29 21:13:48 +03:00
Avi Deitcher
ba25e59640 remove linuxefi grub EFI handover to normal linux loading
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-08-29 17:30:57 +03:00
Avi Deitcher
6979859e76 Merge pull request #4073 from deitch/init-debug-no-control
use only stdout/stderr or file for runc output
2024-08-28 15:28:33 +03:00
Avi Deitcher
5848a2856f use only stdout/stderr or file for runc output
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-08-28 14:45:26 +03:00
Christoph Ostarek
cb8f36adf3 moby: check architecture for docker image
under certain cases the container image is already in the local docker
registry, but with the wrong architecture; in this case just pretend
it is not there and let the caller decide if they want to build it

Signed-off-by: Christoph Ostarek <christoph@zededa.com>
2024-08-27 15:49:21 +02:00
Avi Deitcher
5f09346e1e Merge pull request #4070 from deitch/verbose-runc
more verbose runc messages
2024-08-22 20:55:44 +03:00
Avi Deitcher
15c808c4ee more verbose runc messages
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-08-22 20:23:44 +03:00
Avi Deitcher
745da8f4c0 Merge pull request #4069 from deitch/fix-ro-volumes
when building read-only volumes, still use overlayfs
2024-08-22 19:20:35 +03:00
Avi Deitcher
b36cad081b when building read-only volumes, still use overlayfs
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-08-22 18:49:08 +03:00
Avi Deitcher
370bf51cdf Merge pull request #4067 from deitch/runc-debug-options
support cmdline-driven debugging mode for runc
2024-08-22 15:53:46 +03:00
Avi Deitcher
2af30c5503 support cmdline-driven debugging mode for runc
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-08-22 15:14:35 +03:00
Avi Deitcher
270fd1c5aa Merge pull request #4066 from deitch/ssh-support
support for pkg build ssh
2024-07-28 13:32:42 +03:00
Avi Deitcher
51727db254 support for pkg build ssh
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-07-28 11:39:55 +03:00
Avi Deitcher
34304b1e63 Merge pull request #4065 from deitch/volumes
Volumes
2024-07-21 20:33:02 +03:00
Avi Deitcher
38a0cb6376 test cases for volumes
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-07-21 20:02:40 +03:00
Avi Deitcher
a5085fc9ea pkg/init support for volumes
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-07-21 17:48:39 +03:00
Avi Deitcher
b953d1781c add support for volumes
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-07-21 17:48:38 +03:00
Avi Deitcher
fa08581fd5 Merge pull request #4064 from deitch/containerd-config-2
containerd config.toml v2
2024-07-19 09:54:34 +03:00
Avi Deitcher
d665a978a1 containerd config.toml v2
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-07-18 22:01:15 +03:00
Avi Deitcher
d68494ba4b Merge pull request #4063 from deitch/bump-containerd-1.7.20
containerd to 1.7.20
2024-07-18 21:40:39 +03:00
Avi Deitcher
55e13c914e containerd to 1.7.20
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-07-18 20:51:31 +03:00
Avi Deitcher
c3c6dc7735 Merge pull request #4062 from deitch/debug-containerd
include example for debugging containerd
2024-07-17 14:30:46 +03:00
Avi Deitcher
5d9f3e0aa0 include example for debugging containerd
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-07-17 14:29:29 +03:00
Avi Deitcher
690a4eecb5 Merge pull request #4061 from deitch/multi-pkg-deps
Multi pkg deps
2024-07-16 18:33:59 +03:00
Avi Deitcher
cd65ec385b Merge pull request #4060 from deitch/linuxkit-deps
bump docker deps in linuxkit binary
2024-07-16 12:58:01 +03:00
Avi Deitcher
f13aee1041 update rngd/extend/init usage in yml
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-07-16 12:29:10 +03:00
Avi Deitcher
315a1dbf20 pkg/extend bump x/sys version
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-07-16 12:24:48 +03:00
Avi Deitcher
7ac157e61b pkg/host-timesync-daemon bump x/sys version
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-07-16 12:23:24 +03:00
Avi Deitcher
53f848a229 pkg/rngd bump x/sys version
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-07-16 12:23:23 +03:00
Avi Deitcher
4ad55951e1 bump docker deps in linuxkit binary
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-07-16 12:15:22 +03:00
Avi Deitcher
5d940f4770 Merge pull request #4059 from deitch/more-init-alerts
bump pkg/init containerd, runc and image-spec to fix CVEs
2024-07-16 12:07:32 +03:00
Avi Deitcher
1fe9d0ea76 bump pkg/init containerd, runc and image-spec to fix CVEs
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-07-16 10:55:01 +03:00
Avi Deitcher
7b114bfa36 Merge pull request #4058 from deitch/init-security-alerts
update package versions and go version for pkg/init
2024-07-16 09:50:54 +02:00
Avi Deitcher
6bbda93914 update package versions and go version for pkg/init
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-07-16 10:11:23 +03:00
Avi Deitcher
e6ffc8a8f3 Merge pull request #4057 from deitch/build-targets-all-not-macos
make targets separated by OS
2024-07-11 19:03:20 +02:00
Avi Deitcher
e6ac960951 make targets separated by OS
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-07-11 18:09:48 +02:00
Avi Deitcher
933445f071 Merge pull request #4056 from deitch/handle-cross-compilation-macos
separate release builds of macOS CGO from others
2024-07-11 17:24:05 +02:00
Avi Deitcher
7acc8262f2 separate release builds of macOS CGO from others
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-07-11 16:55:51 +02:00
Avi Deitcher
bfac135e4e Merge pull request #4055 from deitch/include-semver-in-version
properly save linuxkit version
2024-07-11 15:41:20 +02:00
Avi Deitcher
8bb9174b28 properly save linuxkit version
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-07-11 15:16:26 +02:00
Avi Deitcher
8d76ae282f Merge pull request #4054 from christoph-zededa/fix_build_command_args
cmd: allow more than one config yaml for build
2024-07-10 19:00:52 +03:00
Christoph Ostarek
04dc9042cf cmd: allow more than one config yaml for build
according to the documentation the following command is valid:
`linuxkit build equinixmetal.yml equinixmetal.arm64.yml`
(docs/platform-equinixmetal.md)

So, make it valid.

Signed-off-by: Christoph Ostarek <christoph@zededa.com>
2024-07-10 17:24:53 +02:00
Avi Deitcher
c90f2ee8f2 Merge pull request #4052 from deitch/packet-to-metal
Packet to metal
2024-07-07 16:39:18 +03:00
Avi Deitcher
ad4c97c430 switch linuxkit from deprecated packngo to equinixmetal go-sdk
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-07-05 17:57:48 +03:00
Avi Deitcher
8f6ea3c85e switch Packet references to Equinix Metal
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-07-05 17:22:25 +03:00
Avi Deitcher
3f80ca694f Merge pull request #4049 from danrzs/master
ensured dumpFollow of logread includes 'follow' behaviour
2024-07-03 19:57:34 +03:00
Daniel Smith
cda7577e3c ensured dumpFollow of logread includes 'follow' behaviour
Signed-off-by: Daniel Smith <daniel@razorsecure.com>
2024-07-03 13:55:46 +01:00
Avi Deitcher
be7dfdd42c Merge pull request #4046 from jalaziz/4045
Improve support for third-party registry images
2024-06-24 11:08:04 -07:00
Jameel Al-Aziz
21e9f0fa1c add tests
Signed-off-by: Jameel Al-Aziz <jameel@bastion.io>
2024-06-22 01:58:37 -04:00
Jameel Al-Aziz
5e42d050a7 Improve support for third-party registry images
Update `ReferenceExpand` to support image references from remote
registries. This fixes local image lookup and pulling with newer
versions of Docker.

fixes #4045

Signed-off-by: Jameel Al-Aziz <jameel@bastion.io>
2024-06-18 21:57:51 -07:00
Avi Deitcher
4f89f4f67e Merge pull request #4043 from deitch/buildkit-bump 2024-06-11 18:29:11 +03:00
Avi Deitcher
977afa7510 remove no longer necessary rand.Seed
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-06-11 17:42:55 +03:00
Avi Deitcher
7c46ac8c5d bump buildkit to latest v0.13.2 with deps
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-06-11 15:55:42 +03:00
Avi Deitcher
f48e442a46 Merge pull request #4044 from deitch/go-1.22
bump actions/setup-go to v5 and go-version to 1.22.3
2024-06-11 15:55:13 +03:00
Avi Deitcher
4c3d189a1a bump actions/setup-go to v5 and go-version to 1.22.3
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-06-11 15:20:58 +03:00
Avi Deitcher
9e06024567 Merge pull request #4040 from deitch/export-formats
add cache export format OCI
2024-05-16 15:48:20 +03:00
Avi Deitcher
f5dcefc7c2 add cache export format OCI
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-05-16 14:38:19 +03:00
Avi Deitcher
6d37353ca1 Merge pull request #4039 from deitch/split-moby
move moby components that do not have runtime dependencies to own directory
2024-05-07 20:27:35 +03:00
Avi Deitcher
379617ca0d move moby components that do not have runtime dependencies to own directory
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-05-07 19:51:25 +03:00
Avi Deitcher
b49e32af98 Merge pull request #4036 from deitch/fix-action-script-v7 2024-04-28 16:30:14 +03:00
Avi Deitcher
5299f948e3 use proper path for github-script properties
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-04-28 15:56:53 +03:00
Avi Deitcher
e171750da6 Merge pull request #4035 from deitch/action-script-v7 2024-04-28 15:25:33 +03:00
Avi Deitcher
c32c74bc1d github script v7
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-04-28 14:43:52 +03:00
Avi Deitcher
d3257af256 Merge pull request #4034 from deitch/token-for-actions 2024-04-28 13:58:27 +03:00
Avi Deitcher
2578ae23c6 explicitly use GITHUB_TOKEN for actions script
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-04-28 12:58:10 +03:00
Avi Deitcher
38e62bb61d Merge pull request #4033 from jacobweinstock/cgroupsv2-as-default
Make cgroups v2 the default in the init pkg
2024-04-28 11:45:00 +03:00
Jacob Weinstock
2fe19f7561 Update dependencies
Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
2024-04-27 15:40:30 -06:00
Jacob Weinstock
803747f01a Make cgroups v2 the default:
cgroups v2 has been out since 2015. Not having
to set a kernel parameter helps improve the user
experience by not requiring it when it is required
by services in a build. Making this the default was
discussed back in 2021.

Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
2024-04-27 15:40:00 -06:00
Avi Deitcher
8afecd5204 Merge pull request #4031 from deitch/update-actions
bump actions to v4 to avoid deprecation
2024-04-25 12:19:07 +03:00
Avi Deitcher
e6b0ae05eb Merge pull request #4030 from deitch/canonicalize-pull
use canonical ref when looking in cache
2024-04-25 11:50:19 +03:00
Avi Deitcher
04792e0d44 bump actions to v4 to avoid deprecation
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-04-25 11:44:38 +03:00
Avi Deitcher
c836e54d22 use canonical ref when looking in cache
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-04-24 15:00:39 +03:00
Avi Deitcher
bc5d08d6a3 Merge pull request #4028 from largemouth/master
chore: fix function name in comment
2024-04-24 13:27:34 +03:00
largemouth
4ce13640cd chore: fix function name in comment
Signed-off-by: largemouth <largemouth@aliyun.com>
2024-04-22 19:45:14 +08:00
Avi Deitcher
cea4c0d419 Merge pull request #4027 from deitch/not-same-file
prevent using same file for input tar and output tar
2024-04-21 13:55:30 +03:00
Avi Deitcher
dc12b9be69 prevent using same file for input tar and output tar
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-04-21 13:19:57 +03:00
Avi Deitcher
dd1ae909d6 Merge pull request #4026 from deitch/increment-tar-output
add support for input-tar
2024-04-19 17:08:03 +03:00
Avi Deitcher
632b4065d4 add support for input-tar
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-04-19 16:30:06 +03:00
Avi Deitcher
a610332100 Merge pull request #4025 from deitch/tag-sources-in-tar
include image reference as source in every tar file header
2024-04-18 16:34:05 +03:00
Avi Deitcher
1fe8cba107 include image reference as source in every tar file header
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-04-18 16:03:34 +03:00
Avi Deitcher
47d02ecd61 Merge pull request #4024 from deitch/fix-kernel-tools-build
fix kernel tools build.yml files to reflect correct dockerfiles
2024-04-17 11:41:18 +03:00
Avi Deitcher
4d212000ec fix kernel tools build.yml files to reflect correct dockerfiles
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-04-16 19:30:28 +03:00
Avi Deitcher
9e18c9247c Merge pull request #4023 from deitch/commit-tag-arg
add tag to args passed for package builds
2024-04-16 15:14:25 +03:00
Avi Deitcher
6af6291afe add tag to args passed for package builds
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-04-16 13:52:49 +03:00
Avi Deitcher
de79880fff Merge pull request #3960 from Fabsolute/fix-disk-parameter-for-virtualization 2024-04-12 16:50:03 +02:00
Fabsolute
f2240fbeea FIX disk parameter usage
Signed-off-by: Fabsolute <ahmetturk93@gmail.com>
2024-04-12 16:07:30 +02:00
Avi Deitcher
b7bb183d49 Merge pull request #4020 from christoph-zededa/fix_doc_build_iso-efi
README.md: fix format parameter
2024-03-20 09:10:12 +01:00
Christoph Ostarek
6a7cea9dbd README.md: fix format parameter
linuxkit build expects '--format' or '-f' and not
'-format'

Signed-off-by: Christoph Ostarek <christoph@zededa.com>
2024-03-19 18:01:22 +01:00
Avi Deitcher
3ff5dac063 Merge pull request #4018 from christoph-zededa/fix_pulling_from_localhost_registry
util: allow pulling from local registry
2024-03-17 00:57:54 -07:00
Christoph Ostarek
4496612c70 util: allow pulling from local registry
before a command like
linuxkit cache pull 127.0.0.1:5000/pkgalpine

would result in trying to pull the following image:
docker.io/127.0.0.1:5000/pkgalpine

and this is wrong

Signed-off-by: Christoph Ostarek <christoph@zededa.com>
2024-03-15 18:36:31 +01:00
7852 changed files with 1158339 additions and 527100 deletions

View File

@@ -1,6 +1,9 @@
name: LinuxKit CI
on: [push, pull_request]
env:
TOTAL_SHARDS: 12 # change here once
jobs:
build:
name: Build & Test
@@ -35,14 +38,14 @@ jobs:
runs-on: ${{ matrix.target.runner }}
steps:
- name: Set up Go 1.19
uses: actions/setup-go@v3
with:
go-version: 1.19.2
id: go
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Go based on go.mod
uses: actions/setup-go@v5
with:
go-version-file: 'src/cmd/linuxkit/go.mod'
id: go
- name: Set path
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
@@ -50,9 +53,9 @@ jobs:
GOPATH: ${{runner.workspace}}
- name: golangci-lint CLI
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v7
with:
version: v1.50.0
version: v2.0.2
working-directory: src/cmd/linuxkit
args: --verbose --timeout=10m
- name: go vet CLI
@@ -79,7 +82,7 @@ jobs:
GOPATH: ${{runner.workspace}}
- name: Upload binary
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: linuxkit-${{matrix.target.suffix}}
path: |
@@ -93,14 +96,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up binfmt
# Only register arm64 as we are on amd64 already. s390x is not reliable
run: docker run --privileged --rm tonistiigi/binfmt --install arm64
- name: Download linuxkit
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: linuxkit-amd64-linux
path: bin
@@ -112,7 +115,7 @@ jobs:
/usr/local/bin/linuxkit version
- name: Cache Packages
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.linuxkit/cache/
key: ${{ runner.os }}-linuxkit-${{ github.sha }}
@@ -122,13 +125,13 @@ jobs:
- name: Build Packages
# Skip s390x as emulation is unreliable
run: |
make OPTIONS="-v --skip-platforms linux/s390x" -C pkg build
make OPTIONS="-v 2 --skip-platforms linux/s390x" -C pkg build
- name: Build Test Packages
# ensures that the test packages are in linuxkit cache when we need them for tests later
# Skip s390x as emulation is unreliable
run: |
make OPTIONS="-v --skip-platforms linux/s390x" -C test/pkg build
make OPTIONS="-v 2 --skip-platforms linux/s390x" -C test/pkg build
- name: Check Kernel Dependencies up to date
# checks that any kernel dependencies are up to date.
@@ -145,22 +148,51 @@ jobs:
# ensures that the kernel packages are in linuxkit cache when we need them for tests later
# no need for excluding s390x, as each build.yml in the kernel explicitly lists archs
run: |
make OPTIONS="-v" -C kernel build
make OPTIONS="-v 2" -C kernel build
- name: list cache contents
run: |
linuxkit cache ls
gen_package_test_matrix:
name: Generate Package Test Matrix
needs: [ build_packages, build ]
runs-on: ubuntu-latest
outputs:
shard_list: ${{ steps.mk.outputs.list }}
steps:
- name: Generate Test Matrix
id: mk
shell: bash
run: |
set -x
N="${{ env.TOTAL_SHARDS }}"
# Priority: repo var SHARDS → event-based default (PR=6, else 10)
if [ -n "${{ vars.SHARDS }}" ]; then
N="${{ vars.SHARDS }}"
fi
# Build JSON array ["1/N","2/N",...,"N/N"]
shards=""
for i in $(seq 1 "$N"); do
if [ -z "$shards" ]; then
shards="\"$i/$N\""
else
shards="$shards,\"$i/$N\""
fi
done
echo "list=[$shards]" >> "$GITHUB_OUTPUT"
test_packages:
name: Packages Tests
needs: [ build_packages, build ]
needs: [ build_packages, build, gen_package_test_matrix ]
runs-on: ubuntu-latest
strategy:
matrix:
shard: [1/10,2/10,3/10,4/10,5/10,6/10,7/10,8/10,9/10,10/10]
shard: ${{ fromJson(needs.gen_package_test_matrix.outputs.shard_list) }}
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Pre-Requisites
run: |
@@ -170,7 +202,7 @@ jobs:
- name: Restore RTF From Cache
id: cache-rtf
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: bin
key: rtf-${{hashFiles('Makefile')}}
@@ -184,7 +216,7 @@ jobs:
sudo ln -s $(pwd)/bin/rtf /usr/local/bin/rtf
- name: Download linuxkit
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: linuxkit-amd64-linux
path: bin
@@ -196,7 +228,7 @@ jobs:
/usr/local/bin/linuxkit version
- name: Restore Package Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.linuxkit/cache/
key: ${{ runner.os }}-linuxkit-${{ github.sha }}
@@ -215,7 +247,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Pre-Requisites
run: |
@@ -225,7 +257,7 @@ jobs:
- name: Restore RTF From Cache
id: cache-rtf
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: bin
key: rtf-${{hashFiles('Makefile')}}
@@ -239,7 +271,7 @@ jobs:
sudo ln -s $(pwd)/bin/rtf /usr/local/bin/rtf
- name: Download linuxkit
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: linuxkit-amd64-linux
path: bin
@@ -251,7 +283,7 @@ jobs:
/usr/local/bin/linuxkit version
- name: Restore Package Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.linuxkit/cache/
key: ${{ runner.os }}-linuxkit-${{ github.sha }}
@@ -271,7 +303,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Pre-Requisites
run: |
@@ -281,13 +313,13 @@ jobs:
- name: Restore RTF From Cache
id: cache-rtf
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: bin
key: rtf-${{hashFiles('Makefile')}}
- name: Restore Package Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.linuxkit/cache/
key: ${{ runner.os }}-linuxkit-${{ github.sha }}
@@ -303,7 +335,7 @@ jobs:
sudo ln -s $(pwd)/bin/rtf /usr/local/bin/rtf
- name: Download linuxkit
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: linuxkit-amd64-linux
path: bin
@@ -327,7 +359,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Pre-Requisites
run: |
@@ -337,7 +369,7 @@ jobs:
- name: Restore RTF From Cache
id: cache-rtf
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: bin
key: rtf-${{hashFiles('Makefile')}}
@@ -351,7 +383,7 @@ jobs:
sudo ln -s $(pwd)/bin/rtf /usr/local/bin/rtf
- name: Download linuxkit
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: linuxkit-amd64-linux
path: bin
@@ -363,7 +395,7 @@ jobs:
/usr/local/bin/linuxkit version
- name: Restore Package Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.linuxkit/cache/
key: ${{ runner.os }}-linuxkit-${{ github.sha }}
@@ -383,7 +415,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Pre-Requisites
run: |
@@ -393,7 +425,7 @@ jobs:
- name: Restore RTF From Cache
id: cache-rtf
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: bin
key: rtf-${{hashFiles('Makefile')}}
@@ -407,7 +439,7 @@ jobs:
sudo ln -s $(pwd)/bin/rtf /usr/local/bin/rtf
- name: Download linuxkit
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: linuxkit-amd64-linux
path: bin
@@ -419,7 +451,7 @@ jobs:
/usr/local/bin/linuxkit version
- name: Restore Package Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.linuxkit/cache/
key: ${{ runner.os }}-linuxkit-${{ github.sha }}

View File

@@ -9,13 +9,13 @@ jobs:
if: github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/pkg-v')
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.21
uses: actions/setup-go@v3
with:
go-version: 1.21.5
id: go
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Go based on go.mod
uses: actions/setup-go@v5
with:
go-version-file: 'src/cmd/linuxkit/go.mod'
id: go
- name: Ensure bin/ directory
run: mkdir -p bin
- name: Install linuxkit

View File

@@ -14,14 +14,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Ensure bin/ directory
run: mkdir -p bin
- name: Download linuxkit
uses: actions/github-script@v3.1.0
uses: actions/github-script@v7
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
var artifacts = await github.actions.listWorkflowRunArtifacts({
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id }},
@@ -29,7 +30,7 @@ jobs:
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "${{ env.linuxkit_file }}"
})[0];
var download = await github.actions.downloadArtifact({
var download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
@@ -45,7 +46,7 @@ jobs:
sudo ln -s $(pwd)/bin/${{ env.linuxkit_file }} /usr/local/bin/linuxkit
/usr/local/bin/linuxkit version
- name: Restore Package Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.linuxkit/cache/
key: ${{ runner.os }}-linuxkit-${{ github.sha }}

View File

@@ -4,20 +4,20 @@ on:
create:
jobs:
build:
name: Build all targets
build-all:
name: Build all targets expect macOS
if: github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.19
uses: actions/setup-go@v3
- name: Check out code
uses: actions/checkout@v4
- name: Set up Go based on go.mod
uses: actions/setup-go@v5
with:
go-version: 1.19.2
go-version-file: 'src/cmd/linuxkit/go.mod'
id: go
- name: Check out code
uses: actions/checkout@v3
- name: Set path
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
@@ -26,15 +26,72 @@ jobs:
- name: Build
run: |
make build-all-targets
make build-targets-linux build-targets-windows
env:
GOPATH: ${{runner.workspace}}
- uses: actions/upload-artifact@v4
with:
name: release-targets-except-cgo
path: bin/
# separate macos build because macos needs CGO, and it is very hard to cross-compile that
build-macos:
name: Build macOS target
if: github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/v')
runs-on: macos-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Go based on go.mod
uses: actions/setup-go@v5
with:
go-version-file: 'src/cmd/linuxkit/go.mod'
id: go
- name: Set path
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
env:
GOPATH: ${{runner.workspace}}
- name: Build
run: |
make build-targets-macos
env:
GOPATH: ${{runner.workspace}}
- uses: actions/upload-artifact@v4
with:
name: release-targets-macos
path: bin/
release-artifacts:
needs: [build-all, build-macos]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: release-targets-except-cgo
path: bintmp/release-targets-except-cgo
- uses: actions/download-artifact@v4
with:
name: release-targets-macos
path: bintmp/release-targets-macos
- name: Combine Artifacts
run: |
mkdir -p bin/
cp bintmp/*/* bin/
- name: Checksum Artifacts
run: |
make checksum-targets
- name: GitHub Release
uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: true
draft: false
files: bin/*
generate_release_notes: true
generate_release_notes: true

View File

@@ -4,7 +4,7 @@ VERSION="v0.8+"
TEST_SUITE ?=
TEST_SHARD ?=
GO_COMPILE=linuxkit/go-compile:c97703655e8510b7257ffc57f25e40337b0f0813
GO_COMPILE=linuxkit/go-compile:985a9db72a7e6941de5e1eb71c2b41b76bf0556f
ifeq ($(OS),Windows_NT)
LINUXKIT?=$(CURDIR)/bin/linuxkit.exe
@@ -34,7 +34,7 @@ export VERSION GO_COMPILE GOOS GOARCH LOCAL_TARGET LINUXKIT
default: linuxkit $(RTF)
all: default
RTF_COMMIT=b74a4f7c78e5cddcf7e6d2e6be7be312b9f645fc
RTF_COMMIT=1118e08445438dc37ec62b4c1e216918b3d804d2
RTF_CMD=github.com/linuxkit/rtf/cmd
RTF_VERSION=0.0
$(RTF): tmp_rtf_bin.tar | bin
@@ -119,18 +119,27 @@ endif
./scripts/update-component-sha.sh --image $${img}$(image); \
done
.PHONY: build-all-targets
build-all-targets: bin
$(MAKE) GOOS=darwin GOARCH=arm64 LOCAL_TARGET=$(CURDIR)/bin/linuxkit-darwin-arm64 local-build
file bin/linuxkit-darwin-arm64
$(MAKE) GOOS=darwin GOARCH=amd64 LOCAL_TARGET=$(CURDIR)/bin/linuxkit-darwin-amd64 local-build
file bin/linuxkit-darwin-amd64
.PHONY: build-targets-all build-targets-linux build-targets-windows build-targets-macos checksum-targets
build-targets-all: build-targets-linux build-targets-windows build-targets-macos
build-targets-linux: bin
$(MAKE) GOOS=linux GOARCH=arm64 LOCAL_TARGET=$(CURDIR)/bin/linuxkit-linux-arm64 local-build
file bin/linuxkit-linux-arm64
$(MAKE) GOOS=linux GOARCH=amd64 LOCAL_TARGET=$(CURDIR)/bin/linuxkit-linux-amd64 local-build
file bin/linuxkit-linux-amd64
$(MAKE) GOOS=linux GOARCH=s390x LOCAL_TARGET=$(CURDIR)/bin/linuxkit-linux-s390x local-build
file bin/linuxkit-linux-s390x
build-targets-windows: bin
$(MAKE) GOOS=windows GOARCH=amd64 LOCAL_TARGET=$(CURDIR)/bin/linuxkit-windows-amd64.exe local-build
file bin/linuxkit-windows-amd64.exe
build-targets-macos: bin
$(MAKE) GOOS=darwin GOARCH=arm64 LOCAL_TARGET=$(CURDIR)/bin/linuxkit-darwin-arm64 local-build
file bin/linuxkit-darwin-arm64
$(MAKE) GOOS=darwin GOARCH=amd64 LOCAL_TARGET=$(CURDIR)/bin/linuxkit-darwin-amd64 local-build
file bin/linuxkit-darwin-amd64
checksum-targets: bin
cd bin && openssl sha256 -r linuxkit-* | tr -d '*' > checksums.txt

View File

@@ -63,8 +63,8 @@ Once you have built the tool, use
```
linuxkit build linuxkit.yml
```
to build the example configuration. You can also specify different output formats, eg `linuxkit build -format raw-bios linuxkit.yml` to
output a raw BIOS bootable disk image, or `linuxkit build -format iso-efi linuxkit.yml` to output an EFI bootable ISO image. See `linuxkit build -help` for more information.
to build the example configuration. You can also specify different output formats, eg `linuxkit build --format raw-bios linuxkit.yml` to
output a raw BIOS bootable disk image, or `linuxkit build --format iso-efi linuxkit.yml` to output an EFI bootable ISO image. See `linuxkit build -help` for more information.
### Booting and Testing
@@ -87,7 +87,7 @@ Currently supported platforms are:
- [OpenStack](docs/platform-openstack.md) `[x86_64]`
- [Scaleway](docs/platform-scaleway.md) `[x86_64]`
- Baremetal:
- [packet.net](docs/platform-packet.md) `[x86_64, arm64]`
- [deploy.equinix.com](docs/platform-equinixmetal.md) `[x86_64, arm64]`
- [Raspberry Pi Model 3b](docs/platform-rpi3.md) `[arm64]`

View File

@@ -30,7 +30,7 @@ spec:
operator: Exists
effect: NoSchedule
containers:
- image: linuxkit/open-vm-tools:728ddf726474178eea97604c0baeabd52edab7e9
- image: linuxkit/open-vm-tools:ce668b7064e26dbb4767a9106aae8cb888a3a61c
name: open-vm-tools
resources:
requests:

View File

@@ -101,9 +101,9 @@ In the below, replace `linuxkit-arch` with each build machine's name:
```sh
# one of these will not be necessary, as you will likely be executing it on one of these machines
scp linuxkit-s390x:$LK_ROOT/tools/alpine/versions.s390x $LK_ROOT/tools/alpine/versions.s390x
scp linuxkit-aarch64:$LK_ROOT/tools/alpine/versions.aarch64 $LK_ROOT/tools/alpine/versions.aarch64
scp linuxkit-x86_64:$LK_ROOT/tools/alpine/versions.x86_64 $LK_ROOT/tools/alpine/versions.x86_64
for arch in x86_64 aarch64 riscv64; do
scp linuxkit-$arch:$LK_ROOT/tools/alpine/versions.$arch $LK_ROOT/tools/alpine/versions.$arch
done
git commit -a -s -m "tools/alpine: Update to latest"
git push $LK_REMOTE $LK_BRANCH
```
@@ -131,7 +131,6 @@ following which is an explanation of each one.
# Update tools packages
cd $LK_ROOT/tools
$LK_ROOT/scripts/update-component-sha.sh --image $LK_ALPINE
git checkout grub-dev/Dockerfile
git checkout mkimage-rpi3/Dockerfile
git commit -a -s -m "tools: Update to the latest linuxkit/alpine"
@@ -183,7 +182,6 @@ Note, the `git checkout` reverts the changes made by
Important is the `git checkout` of some sensitive packages that only can be built with
specific older versions of upstream packages:
* `grub-dev`
* `mkimage-rpi3`
Only update those if you know what you are doing with them.

19
docs/cmdline.md Normal file
View File

@@ -0,0 +1,19 @@
# Kernel command-line options
The kernel command-line is a string of text that the kernel parses as it is starting up. It is passed by the boot loader
to the kernel and specifies parameters that the kernel uses to configure the system. The command-line is a list of command-line
options separated by spaces. The options are parsed by the kernel and can be used to enable or disable certain features.
LinuxKit passes all command-line options to the kernel, which uses them in the usual way.
There are several options that can be used to control the behaviour of linuxkit itself, or specifically packages
within linuxkit. Unless standard Linux options exist, these all are prefaced with `linuxkit.`.
| Option | Description |
|---|---|
| `linuxkit.unified_cgroup_hierarchy=0` | Start up cgroups v1. If not present or set to 1, default to cgroups v1. |
| `linuxkit.runc_debug=1` | Start runc for `onboot` and `onshutdown` containers to run with `--debug`, and add extra logging messages for each stage of starting those containers. If not present or set to 0, default to usual mode. |
| `linuxkit.runc_console=1` | Send logs for runc for `onboot` and `onshutdown` containers, as well as the output of the containers themselves, to the console, instead of the normal output to logfiles. If not present or set to 0, default to usual mode. |
It often is useful to combine both of the `linuxkit.runc_debug` and `linuxkit.runc_console` options to get the most
information about what is happening with `onboot` containers.

View File

@@ -59,3 +59,31 @@ is provided, it always will pull, independent of what is in the cache.
The read process is smart enough to check each blob in the local cache before downloading
it from a registry.
## Imports from local Docker instance
To import an image from your local Docker daemon into LinuxKit, youll need to ensure the image is exported in the [OCI image format](https://docs.docker.com/build/exporters/oci-docker/), which LinuxKit understands.
This requires using a `docker-container` [buildx driver](https://docs.docker.com/build/builders/drivers/docker-container/), rather than the default.
Set it up like so:
```shell
docker buildx create --driver docker-container --driver-opt image=moby/buildkit:latest --name=ocibuilder --bootstrap
```
Then build and export your image using the OCI format:
```shell
docker buildx build --builder=ocibuilder --output type=oci,name=foo . > foo.tar
```
You can now import it into LinuxKit with:
```shell
linuxkit cache import foo.tar
```
Note that this process, as described, will only produce images for the platform/architecture you're currently on. To produce multi-platform images requires extra docker build flags and external builder or QEMU support - see [here](https://docs.docker.com/build/building/multi-platform/).
This workaround is only necessary when working with the local Docker daemon. If youre pulling from Docker Hub or another registry, you dont need to do any of this.

View File

@@ -274,7 +274,7 @@ your local Docker setup.
The process of modifying the kernel configuration is as follows:
1. Create a `linuxkit/kconfig` container image: `make kconfig`. This is not pushed out.
1. Create a `linuxkit/kconfig` container image: `make kconfig`. This is not pushed out. By default, this will be for your local architecture, but you can override it with `make kconfig ARCH=${ARCH}`, e.g. `make kconfig ARCH=arm64`. The image is tagged with the architecture, e.g. `linuxkit/kconfig:arm64`.
1. Run a container based on `linuxkit/kconfig`.
1. In the container, modify the config to suit your needs using normal kernel tools like `make defconfig` or `make menuconfig`.
1. Save the config from the image.
@@ -287,7 +287,11 @@ so that `make menuconfig` and `make defconfig` work correctly.
Run the container as follows:
```sh
docker run --rm -ti -v $(pwd):/src linuxkit/kconfig
docker run --rm -ti -v $(pwd):/src linuxkit/kconfig:aarch64
# or
docker run --rm -ti -v $(pwd):/src linuxkit/kconfig:x86_64
# or
docker run --rm -ti -v $(pwd):/src linuxkit/kconfig:riscv64
```
This will give you a interactive shell where you can modify the kernel
@@ -321,6 +325,11 @@ make ARCH=arm64 defconfig
make ARCH=arm64 oldconfig # or menuconfig
```
It is important to note that sometimes the configuration can be subtly different
when running `make defconfig` across architectures. Of note is that `make ARCH=riscv` on
x86_64 or aarch64 comes out slightly differently than when run natively on riscv64.
Feel free to try it cross, but do not be surprised if it generates outputs that are not the same.
Note that the generated file **must** be final. When you actually build the kernel,
it will check that running `make defconfig` will have no changes. If there are changes,
the build will fail.

View File

@@ -50,13 +50,14 @@ A package source consists of a directory containing at least two files:
- `image` _(string)_: *(mandatory)* The name of the image to build
- `org` _(string)_: The hub/registry organisation to which this package belongs
- `tag` _(string)_: The tag to use for the image, can be fixed string or template (default: `{{.Hash}}`)
- `dockerfile` _(string)_: The dockerfile to use to build this package, must be in this directory or below (default: `Dockerfile`)
- `arches` _(list of string)_: The architectures which this package should be built for (valid entries are `GOARCH` names)
- `extra-sources` _(list of strings)_: Additional sources for the package outside the package directory. The format is `src:dst`, where `src` can be relative to the package directory and `dst` is the destination in the build context. This is useful for sharing files, such as vendored go code, between packages.
- `gitrepo` _(string)_: The git repository where the package source is kept.
- `network` _(bool)_: Allow network access during the package build (default: no)
- `disable-cache` _(bool)_: Disable build cache for this package (default: no)
- `buildArgs` will forward a list of build arguments down to docker. As if `--build-arg` was specified during `docker build`
- `buildArgs` will forward a list of build arguments down to docker. As if `--build-arg` was specified during `docker build`. See [BuildArgs][BuildArgs] for more information.
- `config`: _(struct `github.com/moby/tool/src/moby.ImageConfig`)_: Image configuration, marshalled to JSON and added as `org.mobyproject.config` label on image (default: no label)
- `depends`: Contains information on prerequisites which must be satisfied in order to build the package. Has subfields:
- `docker-images`: Docker images to be made available (as `tar` files via `docker image save`) within the package build context. Contains the following nested fields:
@@ -272,6 +273,8 @@ When building packages, the following build-args automatically are set for you:
* `SOURCE` - the source repository of the package
* `REVISION` - the git commit that was used for the build
* `GOPKGVERSION` - the go package version or pseudo-version per https://go.dev/ref/mod#glos-pseudo-version
* `PKG_HASH` - the git tree hash of the package directory, e.g. `45a1ad5919f0b6acf0f0cf730e9434abfae11fe6`; tag part of `linuxkit pkg show-tag`
* `PKG_IMAGE` - the name of the image that is being built, e.g. `linuxkit/init`; image name part of `linuxkit pkg show-tag`. Combine with `PKG_HASH` for the full tag.
Note that the above are set **only** if you do not set them in `build.yaml`. Your settings _always_
override these built-in ones.
@@ -379,6 +382,90 @@ ARG all_proxy
LinuxKit does not judge between lower-cased or upper-cased variants of these options, e.g. `http_proxy` vs `HTTP_PROXY`,
as `docker build` does not either. It just passes them through "as-is".
### Environment Variables
The following environment variables can be used to configure `linuxkit` without
modifying command-line invocations — useful for CI/CD runners and shared build
scripts. CLI flags always take precedence over env vars, which take precedence
over built-in defaults.
| Variable | Equivalent flag | Scope | Description |
|---|---|---|---|
| `LINUXKIT_MIRROR` | `--mirror` | All commands | Space- or comma-separated list of mirror specs, each in `[<registry>=]<url>` format (same as `--mirror`). E.g. `LINUXKIT_MIRROR=docker.io=http://mymirror.local` |
| `LINUXKIT_PKG_ORG` | `--org` | `pkg` subcommands | Override the registry organisation used when tagging and pushing packages. E.g. `LINUXKIT_PKG_ORG=myorg/lfedge` |
| `LINUXKIT_BUILDER_IMAGE` | `--builder-image` | `pkg build` | buildkit container image to use. Useful when the builder image must come from an internal mirror. |
| `LINUXKIT_BUILDER_CONFIG` | `--builder-config` | `pkg build` | Path to a buildkit `config.toml` file. The primary way to configure buildkit's own registry mirrors for `FROM` pulls inside Dockerfiles. |
| `LINUXKIT_BUILDER_NAME` | `--builder-name` | `pkg build` | Name of the buildkit builder container. |
| `LINUXKIT_BUILDERS` | `--builders` | `pkg build` | Platform-to-builder-context mapping; see [Providing native builder nodes](#providing-native-builder-nodes). |
| `LINUXKIT_CACHE` | `--cache` | All commands | Path to the linuxkit OCI image cache directory (default `~/.linuxkit/cache`). |
#### Registry mirrors in CI
There are two layers of registry access in `linuxkit pkg build`, each requiring
its own mirror configuration:
1. **linuxkit's own pulls** (cache lookups, `show-tag`, `cache pull`, etc.) —
configure via `LINUXKIT_MIRROR` or `--mirror`.
2. **buildkit's pulls** (`FROM` and `COPY --from` inside Dockerfiles) —
buildkit has its own registry client. Configure its mirrors via a
`config.toml` file passed through `LINUXKIT_BUILDER_CONFIG` or
`--builder-config`. See the
[buildkit registry configuration docs](https://github.com/moby/buildkit/blob/master/docs/buildkitd.toml.md)
for the file format.
## Build Args
`linuxkit` does not support passing random CLI flags for build arguments when building packages.
This is inline with its philosophy, of having as reproducible builds as possible, which requires
everything to be available on disk and in the repository.
It is possible to bypass this, but this is not recommended.
As described in [Preset build arguments][Preset build arguments], linuxkit automatically sets some build arguments
when building packages. However, you can also set your own build arguments, which will be passed to the
`docker build` command.
You can include your own build args in several ways.
* `build.yml` - you can add a `buildArgs` field to the `build.yml` file, which will be passed as `--build-arg` to `docker build`.
* `linuxkit pkg build` - you can pass the `--build-arg-file <file>` flag, with one `<key>=<value>` pair per line, which will be passed as `--build-arg` to `docker build`.
When parsing for build args, whether from `build.yml`'s `buildArgs` field or from the `--build-arg-file`,
linuxkit has support for certain calculated build args for the value of the arg. You can set these using the following syntax.
All calculated build args are prefixed with `@lkt:`.
* `VAR=@lkt:pkg:<path>` - the linuxkit package hash of the path, as determined by `linuxkit pkg show-tag <path>`. The `<path>` can be absolute, or if provided as a relative path, it is relative to the working directory of the file. For example, if provided in the `buildArgs` section of `build.yml`, it is relative to the package directory; if provided in `--build-arg-file <file>`, it is relative to the directory in which <file> exists.
For example:
```yaml
buildArgs:
- DEP_HASH=@lkt:pkg:/usr/local/foo # will be replaced with the value of `linuxkit pkg show-tag /usr/local/foo`
- REL_HASH=@lkt:pkg:foo # will be replaced with the value of `linuxkit pkg show-tag foo` relative to this build.yml file
```
* `VAR_%=@lkt:pkgs:<paths>` - (note `pkgs` plural) the linuxkit package hashes of the multiple packages satisfied by `<paths>`. linuxkit will get the linuxkit package hash of each path in `<paths>`, as determined by `linuxkit pkg show-tag <path>`. The `<paths>` can be absolute, or if provided as a relative path, it is relative to the working directory of the file which contains the build arg, whether `build.yml` in a package or the build arg
file provided to `--build-arg-file <file>`. The `<paths>` supports basic shell globbing, such as `./foo/*` or `/var/foo{1,2,3}`. Globs that start with `.` will be ignored, e.g. `foo/*` will match `foo/one` and `foo/two` but not `foo/.git` and `foo/.bar`. For each package in `<paths>`, it will create a build arg with the name `VAR_<package-name>` and the value of the package hash, where: the `%` is replaced with the name of the package; an all `/` and `-` characters are replaced with `_`; all characters are upper-cased.
There _must_ be at least one valid environment variable character before the `%` character.
For example:
```yaml
buildArgs:
- DEP_HASH_%=@lkt:pkgs:/usr/local/foo/*
```
If there are packages in `/usr/local/foo/` named `bar`, `baz`, and `qux`, and each of them has a package as shown
by `linuxkit pkg show-tag` as `linuxkit/bar:123abc`, `linuxkit/baz:aabb666`, and `linuxkit/qux:bbcc777`, this will create the following build args:
```
DEP_HASH_LINUXKIT_BAR=linuxkit/bar:123abc
DEP_HASH_LINUXKIT_BAZ=linuxkit/baz:aabb666
DEP_HASH_LINUXKIT_QUX=linuxkit/qux:bbcc777
```
## Releases
Normally, whenever a package is updated, CI will build and push the package to Docker Hub by calling `linuxkit pkg push`.

View File

@@ -0,0 +1,142 @@
# LinuxKit with bare metal on Equinix Metal
[Equinix Metal](http://deploy.equinix.com) is a bare metal hosting provider.
You will need to [create an Equinix Metal account] and a project to
put this new machine into. You will also need to [create an API key]
with appropriate read/write permissions to allow the image to boot.
[create an Equinix Metal account]:https://console.equinix.com/sign-up
[create an API key]:https://deploy.equinix.com/developers/docs/metal/identity-access-management/api-keys/
The `linuxkit run equinixmetal` command can mostly either be configured via
command line options or with environment variables. see `linuxkit run
equinixmetal --help` for the options and environment variables.
By default, `linuxkit run` will provision a new machine and remove it
once you are done. With the `-keep` option the provisioned machine
will not be removed. You can then use the `-device` option with the
device ID on subsequent `linuxkit run` invocations to re-use an
existing machine. These subsequent runs will update the iPXE data so
you can boot alternative kernels on an existing machine.
There is an example YAML file for [x86_64](../examples/equinixmetal.yml) and
an additional YAML for [arm64](../examples/equinixmetal.arm64.yml) servers
which provide both access to the serial console and via ssh and
configures bonding for network devices via metadata (if supported).
For x86_64 builds for Intel servers we strongly recommend adding
`ucode: intel-ucode.cpio` to the kernel section in the YAML. This
updates the Intel CPU microcode to the latest by prepending it to the
generated initrd file. The `ucode` entry is only recommended when
booting on baremetal. It should be omitted (but is harmless) when
building images to boot in VMs.
**Note**: The update of the iPXE configuration sometimes may take some
time and the first boot may fail. Hitting return on the console to
retry the boot typically fixes this.
## Boot
LinuxKit on Equinix Metal boots the `kernel+initrd` output from moby via
[iPXE](https://deploy.equinix.com/developers/docs/metal/operating-systems/custom-ipxe/)
which also requires a iPXE script. iPXE booting requires a HTTP server
on which you can store your images. The `-base-url` option specifies
the URL to a HTTP server from which `<name>-kernel`,
`<name>-initrd.img`, and `<name>-equinixmetal.ipxe` can be downloaded during
boot.
If you have your own HTTP server, you can use `linuxkit push equinixmetal`
to create the files (including the iPXE script) you need to make
available.
If you don't have a public HTTP server at hand, you can use the
`-serve` option. This will create a local HTTP server which can either
be run on another Equinix Metal machine or be made accessible with tools
like [ngrok](https://ngrok.com/).
For example, to boot the [example](../examples/platform-equinixmetal.yml)
with a local HTTP server:
```sh
linuxkit build platform-equinixmetal.yml
# run the web server
# run 'ngrok http 8080' in another window
METAL_AUTH_TOKEN=<API key> METAL_PROJECT_ID=<Project ID> \
linuxkit run equinixmetal -serve :8080 -base-url <ngrok url> equinixmetal
```
To boot a `arm64` image for Type 2a machine (`-machine baremetal_2a`)
you currently need to build using `linuxkit build equinixmetal.yml
equinixmetal.arm64.yml` and then un-compress both the kernel and the initrd
before booting, e.g:
```sh
mv equinixmetal-initrd.img equinixmetal-initrd.img.gz && gzip -d equinixmetal-initrd.img.gz
mv equinixmetal-kernel equinixmetal-kernel.gz && gzip -d equinixmetal-kernel.gz
```
The LinuxKit image can then be booted with:
```sh
METAL_API_TOKEN=<API key> METAL_PROJECT_ID=<Project ID> \
linuxkit run equinixmetal -machine baremetal_2a -serve :8080 -base-url -base-url <ngrok url> equinixmetal
```
Alternatively, `linuxkit push equinixmetal` will uncompress the kernel and
initrd images on arm machines (or explicitly via the `-decompress`
flag. There is also a `linuxkit serve` command which will start a
local HTTP server serving the specified directory.
**Note**: It may take several minutes to deploy a new server. If you
are attached to the console, you should see the BIOS and the boot
messages.
## Console
By default, `linuxkit run equinixmetal ...` will connect to the
Equinix Metal
[SOS ("Serial over SSH") console](https://deploy.equinix.com/developers/docs/metal/resilience-recovery/serial-over-ssh/). This
requires `ssh` access, i.e., you must have uploaded your SSH keys to
Equinix Metal beforehand.
You can exit the console vi `~.` on a new line once you are
disconnected from the serial, e.g. after poweroff.
**Note**: We also require that the Equinix Metal SOS host is in your
`known_hosts` file, otherwise the connection to the console will
fail. There is a Equinix Metal SOS host per zone.
You can disable the serial console access with the `-console=false`
command line option.
## Disks
At this moment the Linuxkit server boots from RAM, with no persistent
storage. We are working on adding persistent storage support on Equinix Metal.
## Networking
On the baremetal type 2a system (arm64 Cavium Thunder X) the network device driver does not get autoloaded by `mdev`. Please add:
```
- name: modprobe
image: linuxkit/modprobe:<hash>
command: ["modprobe", "nicvf"]
```
to your YAML files before any containers requiring the network to be up, e.g., the `dhcpcd` container.
Some Equinix Metal server types have bonded networks; the `metadata` package has support for setting
these up, and also for adding additional IP addresses.
## Integration services and Metadata
Equinix Metal supports [user state](https://deploy.equinix.com/developers/docs/metal/server-metadata/user-data/)
during system bringup, which enables the boot process to be more informative about the
current state of the boot process once the kernel has loaded but before the
system is ready for login.

View File

@@ -1,151 +0,0 @@
# LinuxKit with bare metal on Packet
[Packet](http://packet.net) is a bare metal hosting provider.
You will need to [create a Packet account] and a project to
put this new machine into. You will also need to [create an API key]
with appropriate read/write permissions to allow the image to boot.
[create a Packet account]:https://app.packet.net/#/registration/
[create an API key]:https://help.packet.net/quick-start/api-integrations
Linuxkit is known to boot on the [Type 0]
and [Type 1] servers at Packet.
Support for other server types, including the [Type 2A] ARM server,
is a work in progress.
[Type 0]:https://www.packet.net/bare-metal/servers/type-0/
[Type 1]:https://www.packet.net/bare-metal/servers/type-1/
[Type 2A]:https://www.packet.net/bare-metal/servers/type-2a/
The `linuxkit run packet` command can mostly either be configured via
command line options or with environment variables. see `linuxkit run
packet --help` for the options and environment variables.
By default, `linuxkit run` will provision a new machine and remove it
once you are done. With the `-keep` option the provisioned machine
will not be removed. You can then use the `-device` option with the
device ID on subsequent `linuxkit run` invocations to re-use an
existing machine. These subsequent runs will update the iPXE data so
you can boot alternative kernels on an existing machine.
There is an example YAML file for [x86_64](../examples/packet.yml) and
an additional YAML for [arm64](../examples/packet.arm64.yml) servers
which provide both access to the serial console and via ssh and
configures bonding for network devices via metadata (if supported).
For x86_64 builds for Intel servers we strongly recommend adding
`ucode: intel-ucode.cpio` to the kernel section in the YAML. This
updates the Intel CPU microcode to the latest by prepending it to the
generated initrd file. The `ucode` entry is only recommended when
booting on baremetal. It should be omitted (but is harmless) when
building images to boot in VMs.
**Note**: The update of the iPXE configuration sometimes may take some
time and the first boot may fail. Hitting return on the console to
retry the boot typically fixes this.
## Boot
LinuxKit on Packet boots the `kernel+initrd` output from moby via
[iPXE](https://help.packet.net/technical/infrastructure/custom-ipxe)
which also requires a iPXE script. iPXE booting requires a HTTP server
on which you can store your images. The `-base-url` option specifies
the URL to a HTTP server from which `<name>-kernel`,
`<name>-initrd.img`, and `<name>-packet.ipxe` can be downloaded during
boot.
If you have your own HTTP server, you can use `linuxkit push packet`
to create the files (including the iPXE script) you need to make
available.
If you don't have a public HTTP server at hand, you can use the
`-serve` option. This will create a local HTTP server which can either
be run on another Packet machine or be made accessible with tools
like [ngrok](https://ngrok.com/).
For example, to boot the [example](../examples/packet.net)
with a local HTTP server:
```sh
linuxkit build packet.yml
# run the web server
# run 'ngrok http 8080' in another window
PACKET_API_KEY=<API key> PACKET_PROJECT_ID=<Project ID> \
linuxkit run packet -serve :8080 -base-url <ngrok url> packet
```
To boot a `arm64` image for Type 2a machine (`-machine baremetal_2a`)
you currently need to build using `linuxkit build packet.yml
packet.arm64.yml` and then un-compress both the kernel and the initrd
before booting, e.g:
```sh
mv packet-initrd.img packet-initrd.img.gz && gzip -d packet-initrd.img.gz
mv packet-kernel packet-kernel.gz && gzip -d packet-kernel.gz
```
The LinuxKit image can then be booted with:
```sh
PACKET_API_KEY=<API key> PACKET_PROJECT_ID=<Project ID> \
linuxkit run packet -machine baremetal_2a -serve :8080 -base-url -base-url <ngrok url> packet
```
Alternatively, `linuxkit push packet` will uncompress the kernel and
initrd images on arm machines (or explicitly via the `-decompress`
flag. There is also a `linuxkit serve` command which will start a
local HTTP server serving the specified directory.
**Note**: It may take several minutes to deploy a new server. If you
are attached to the console, you should see the BIOS and the boot
messages.
## Console
By default, `linuxkit run packet ...` will connect to the
Packet
[SOS ("Serial over SSH") console](https://help.packet.net/technical/networking/sos-rescue-mode). This
requires `ssh` access, i.e., you must have uploaded your SSH keys to
Packet beforehand.
You can exit the console vi `~.` on a new line once you are
disconnected from the serial, e.g. after poweroff.
**Note**: We also require that the Packet SOS host is in your
`known_hosts` file, otherwise the connection to the console will
fail. There is a Packet SOS host per zone.
You can disable the serial console access with the `-console=false`
command line option.
## Disks
At this moment the Linuxkit server boots from RAM, with no persistent
storage. We are working on adding persistent storage support on Packet.
## Networking
On the baremetal type 2a system (arm64 Cavium Thunder X) the network device driver does not get autoloaded by `mdev`. Please add:
```
- name: modprobe
image: linuxkit/modprobe:<hash>
command: ["modprobe", "nicvf"]
```
to your YAML files before any containers requiring the network to be up, e.g., the `dhcpcd` container.
Some Packet server types have bonded networks; the `metadata` package has support for setting
these up, and also for adding additional IP addresses.
## Integration services and Metadata
Packet supports [user state](https://help.packet.net/technical/infrastructure/user-state)
during system bringup, which enables the boot process to be more informative about the
current state of the boot process once the kernel has loaded but before the
system is ready for login.

View File

@@ -3,7 +3,7 @@
The `linuxkit build` command assembles a set of containerised components into in image. The simplest
type of image is just a `tar` file of the contents (useful for debugging) but more useful
outputs add a `Dockerfile` to build a container, or build a full disk image that can be
booted as a linuxKit VM. The main use case is to build an assembly that includes
booted as a linuxkit VM. The main use case is to build an assembly that includes
`containerd` to run a set of containers, but the tooling is very generic.
The yaml configuration specifies the components used to build up an image . All components
@@ -16,8 +16,19 @@ The Docker images are optionally verified with Docker Content Trust.
For private registries or private repositories on a registry credentials provided via
`docker login` are re-used.
The configuration file is processed in the order `kernel`, `init`, `onboot`, `onshutdown`,
`services`, `files`. Each section adds files to the root file system. Sections may be omitted.
## Sections
The configuration file is processed in the order:
1. `kernel`
1. `init`
1. `volumes`
1. `onboot`
1. `onshutdown`
1. `services`
1. `files`
Each section adds files to the root file system. Sections may be omitted.
Each container that is specified is allocated a unique `uid` and `gid` that it may use if it
wishes to run as an isolated user (or user namespace). Anywhere you specify a `uid` or `gid`
@@ -40,7 +51,7 @@ files:
mode: "0600"
```
## `kernel`
### `kernel`
The `kernel` section is only required if booting a VM. The files will be put into the `boot/`
directory, where they are used to build bootable images.
@@ -50,6 +61,9 @@ which should contain a `kernel` file that will be booted (eg a `bzImage` for `am
called `kernel.tar` which is a tarball that is unpacked into the root, which should usually
contain a kernel modules directory. `cmdline` specifies the kernel command line options if required.
The contents of `cmdline` are passed to the kernel as-is. There are several special values that are
used to control the behaviour of linuxkit packages. See [kernel command line options](../docs/cmdline.md).
To override the names, you can specify the kernel image name with `binary: bzImage` and the tar image
with `tar: kernel.tar` or the empty string or `none` if you do not want to use a tarball at all.
@@ -57,7 +71,7 @@ Kernel packages may also contain a cpio archive containing CPU microcode which n
the initrd. To select this option, recommended when booting on bare metal, add `ucode: intel-ucode.cpio`
to the kernel section.
## `init`
### `init`
The `init` section is a list of images that are used for the `init` system and are unpacked directly
into the root filesystem. This should bring up `containerd`, start the system and daemon containers,
@@ -65,14 +79,14 @@ and set up basic filesystem mounts. in the case of a LinuxKit system. For ease o
modification `runc` and `containerd` images, which just contain these programs are added here
rather than bundled into the `init` container.
## `onboot`
### `onboot`
The `onboot` section is a list of images. These images are run before any other
images. They are run sequentially and each must exit before the next one is run.
These images can be used to configure one shot settings. See [Image
specification](#image-specification) for a list of supported fields.
## `onshutdown`
### `onshutdown`
This is a list of images to run on a clean shutdown. Note that you must not rely on these
being run at all, as machines may be be powered off or shut down without having time to run
@@ -81,18 +95,149 @@ run and when they are not. Most systems are likely to be "crash only" and not ha
but you can attempt to deregister cleanly from a network service here, rather than relying
on timeouts, for example.
## `services`
### `services`
The `services` section is a list of images for long running services which are
run with `containerd`. Startup order is undefined, so containers should wait
on any resources, such as networking, that they need. See [Image
specification](#image-specification) for a list of supported fields.
## `files`
### `volumes`
The volumes section is a list of named volumes that can be used by other containers,
including those in `services`, `onboot` and `onshutdown`. The volumes are created in a directory
chosen by linuxkit at build-time. The volumes then can be referenced by other containers and
mounted into them.
Volumes can be in one of several formats:
* Blank directory: This is the default, and is an empty directory that is created at build-time. It is an overlayfs mount, and can be shared among multiple containers.
* Image laid out as filesystem: The contents of the image are used to populate the volume. Default format when an image is provided.
* Image as OCI v1-layout: The image is used as an [OCI v1-layout](https://github.com/opencontainers/image-spec/blob/main/image-layout.md). Indicated by `format: oci`.
Examples of each are given later in this section.
The `volumes` section can declare a volume to be read-write or read-only. If the volume is read-write,
a volume that is mounted into a container can be mounted read-only or read-write. If the volume is read-only,
it can be mounted into a container read-only; attempting to do so read-write will generate a build-time error.
By default, volumes are created read-write, and are mounted read-write.
Volume names **must** be unique, and must contain only lower-case alphanumeric characters, hyphens, and
underscores.
#### Samples of `volumes`
##### Empty directory
Yaml showing both read-only and read-write:
```yml
volumes:
- name: dira
readonly: true
- name: dirb
readonly: true
```
Contents:
```sh
$ cd dir && ls -la
drwxr-xr-x 19 root wheel 608 Sep 30 15:03 .
drwxrwxrwt 130 root wheel 4160 Sep 30 15:03 ..
```
In the above example:
* `dira` is empty and is read-only.
* `volb` is empty and is read-write.
##### Image directory
Yaml showing both read-only and read-write:
```yml
volumes:
- name: vola
image: alpine:latest
readonly: true
- name: volb
image: alpine:latest
format: filesystem # optional, as this is the default format
readonly: false
```
In the above example:
* `vola` is populated by the contents of `alpine:latest` and is read-only.
* `volb` is populated by the contents of `alpine:latest` and is read-write.
Contents:
```sh
$ cd dir && ls -la
drwxr-xr-x 19 root wheel 608 Sep 30 15:03 .
drwxrwxrwt 130 root wheel 4160 Sep 30 15:03 ..
drwxr-xr-x 84 root wheel 2688 Sep 6 14:34 bin
drwxr-xr-x 2 root wheel 64 Sep 6 14:34 dev
drwxr-xr-x 37 root wheel 1184 Sep 6 14:34 etc
drwxr-xr-x 2 root wheel 64 Sep 6 14:34 home
drwxr-xr-x 13 root wheel 416 Sep 6 14:34 lib
drwxr-xr-x 5 root wheel 160 Sep 6 14:34 media
drwxr-xr-x 2 root wheel 64 Sep 6 14:34 mnt
drwxr-xr-x 2 root wheel 64 Sep 6 14:34 opt
dr-xr-xr-x 2 root wheel 64 Sep 6 14:34 proc
drwx------ 2 root wheel 64 Sep 6 14:34 root
drwxr-xr-x 2 root wheel 64 Sep 6 14:34 run
drwxr-xr-x 63 root wheel 2016 Sep 6 14:34 sbin
drwxr-xr-x 2 root wheel 64 Sep 6 14:34 srv
drwxr-xr-x 2 root wheel 64 Sep 6 14:34 sys
drwxr-xr-x 2 root wheel 64 Sep 6 14:34 tmp
drwxr-xr-x 7 root wheel 224 Sep 6 14:34 usr
drwxr-xr-x 13 root wheel 416 Sep 6 14:34 var
```
##### Image OCI Layout
Yaml showing both read-only and read-write, and both all architectures and a limited subset:
```yml
volumes:
- name: volo
image: alpine:latest
format: oci
readonly: true
- name: volp
image: alpine:latest
readonly: false
format: oci
platforms:
- linux/amd64
```
In the above example:
* `volo` is populated by the contents of `alpine:latest` as an OCI v1-layout for all architectures and is read-only.
* `volb` is populated by the contents of `alpine:latest` as an OCI v1-layout just for linux/amd64 and is read-write.
##### Volumes in `services`
Sample usage of volumes in `services` section:
```yml
services:
- name: myservice
image: alpine:latest
binds:
- volA:/mnt/volA:ro
- volB:/mnt/volB
```
### `files`
The files section can be used to add files inline in the config, or from an external file.
```
```yml
files:
- path: dir
directory: true
@@ -118,7 +263,8 @@ user's home directory.
In addition there is a `metadata` option that will generate the file. Currently the only value
supported here is `"yaml"` which will output the yaml used to generate the image into the specified
file:
```
```yml
- path: etc/linuxkit.yml
metadata: yaml
```
@@ -130,7 +276,7 @@ Because a `tmpfs` is mounted onto `/var`, `/run`, and `/tmp` by default, the `tm
## Image specification
Entries in the `onboot` and `services` sections specify an OCI image and
Entries in the `onboot`, `onshutdown`, `volumes` and `services` sections specify an OCI image and
options. Default values may be specified using the `org.mobyproject.config` image label.
For more details see the [OCI specification](https://github.com/opencontainers/runtime-spec/blob/master/spec.md).
@@ -205,7 +351,8 @@ which specifies some actions to take place when the container is being started.
- `namespace` overrides the LinuxKit default containerd namespace to put the container in; only applicable to services.
An example of using the `runtime` config to configure a network namespace with `wireguard` and then run `nginx` in that namespace is shown below:
```
```yml
onboot:
- name: dhcpcd
image: linuxkit/dhcpcd:<hash>

View File

@@ -1,25 +1,25 @@
kernel:
image: linuxkit/kernel:6.6.13
image: linuxkit/kernel:6.12.59
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0 console=ttysclp0"
init:
- linuxkit/init:45a1ad5919f0b6acf0f0cf730e9434abfae11fe6
- linuxkit/runc:6062483d748609d505f2bcde4e52ee64a3329f5f
- linuxkit/containerd:e7a92d9f3282039eac5fb1b07cac2b8664cbf0ad
- linuxkit/ca-certificates:5aaa343474e5ac3ac01f8b917e82efb1063d80ff
- linuxkit/init:b5506cc74a6812dc40982cacfd2f4328f8a4b12a
- linuxkit/runc:9442aa234715e751a16144f1d4ae3fd1a00fd492
- linuxkit/containerd:ba19f64efd3331a8fd0a33e00eabd14f6ee1780e
- linuxkit/ca-certificates:256f1950df59f2f209e9f0b81374177409eb11de
onboot:
- name: sysctl
image: linuxkit/sysctl:5a374e4bf3e5a7deeacff6571d0f30f7ea8f56db
image: linuxkit/sysctl:43ac1d39da329c3567fcb9689e5ca99de6d169b6
- name: dhcpcd
image: linuxkit/dhcpcd:e9e3580f2de00e73e7b316a007186d22fea056ee
image: linuxkit/dhcpcd:b87e9ececac55a65eaa592f4dd8b4e0c3009afdb
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
services:
- name: getty
image: linuxkit/getty:5d86a2ce2d890c14ab66b13638dcadf74f29218b
image: linuxkit/getty:a86d74c8f89be8956330c3b115b0b1f2e09ef6e0
binds.add:
# this will keep all of the existing ones as well
- /var/tmp:/var/tmp
- name: rngd
image: linuxkit/rngd:cdb919e4aee49fed0bf6075f0a104037cba83c39
image: linuxkit/rngd:984eb580ecb63986f07f626b61692a97aacd7198
files:
- path: etc/getty.shadow
# sample sets password for root to "abcdefgh" (without quotes)

View File

@@ -1,34 +1,34 @@
kernel:
image: linuxkit/kernel:6.6.13
image: linuxkit/kernel:6.12.59
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0 console=ttysclp0"
init:
- linuxkit/init:45a1ad5919f0b6acf0f0cf730e9434abfae11fe6
- linuxkit/runc:6062483d748609d505f2bcde4e52ee64a3329f5f
- linuxkit/containerd:e7a92d9f3282039eac5fb1b07cac2b8664cbf0ad
- linuxkit/ca-certificates:5aaa343474e5ac3ac01f8b917e82efb1063d80ff
- linuxkit/init:b5506cc74a6812dc40982cacfd2f4328f8a4b12a
- linuxkit/runc:9442aa234715e751a16144f1d4ae3fd1a00fd492
- linuxkit/containerd:ba19f64efd3331a8fd0a33e00eabd14f6ee1780e
- linuxkit/ca-certificates:256f1950df59f2f209e9f0b81374177409eb11de
onboot:
- name: sysctl
image: linuxkit/sysctl:5a374e4bf3e5a7deeacff6571d0f30f7ea8f56db
image: linuxkit/sysctl:43ac1d39da329c3567fcb9689e5ca99de6d169b6
- name: dhcpcd
image: linuxkit/dhcpcd:e9e3580f2de00e73e7b316a007186d22fea056ee
image: linuxkit/dhcpcd:b87e9ececac55a65eaa592f4dd8b4e0c3009afdb
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: sysfs
image: linuxkit/sysfs:ec174e06ca756f492e7a3fd6200d5c1672b97511
image: linuxkit/sysfs:6d5bd933762f6b216744c711c6e876756cee9600
- name: format
image: linuxkit/format:e040f4f045f03138a1ee8a22bb6feae7fd5596a6
image: linuxkit/format:4f779c0b0d0ba145b7f03211b5cbf59fbbe12e54
- name: mount
image: linuxkit/mount:19ff89c251a4156bda8ed11c95faad2f40eb770e
image: linuxkit/mount:bd1c3bb45e48e68e47a9456d1669f7119f855184
command: ["/usr/bin/mountie", "/var/lib/docker"]
services:
- name: getty
image: linuxkit/getty:5d86a2ce2d890c14ab66b13638dcadf74f29218b
image: linuxkit/getty:a86d74c8f89be8956330c3b115b0b1f2e09ef6e0
env:
- INSECURE=true
- name: rngd
image: linuxkit/rngd:cdb919e4aee49fed0bf6075f0a104037cba83c39
image: linuxkit/rngd:984eb580ecb63986f07f626b61692a97aacd7198
- name: ntpd
image: linuxkit/openntpd:c90c6dd90f5dfb0ca71a73aac2dad69c8d956af3
image: linuxkit/openntpd:2508f1d040441457a0b3e75744878afdf61bc473
- name: docker
image: docker:20.10.6-dind
@@ -46,7 +46,7 @@ services:
- /etc/docker/daemon.json:/etc/docker/daemon.json
command: ["/usr/local/bin/docker-init", "/usr/local/bin/dockerd"]
- name: cadvisor
image: linuxkit/cadvisor:c57efffad1139b2c5df1c3f66c1e3d586ce9e07d
image: linuxkit/cadvisor:117b93de56bb9d4838ad61d22146572c4261f449
files:
- path: var/lib/docker
directory: true

View File

@@ -0,0 +1,4 @@
cliopts="--log-level trace"
stderr="/var/log/containerd.err.log"
stdout="/var/log/containerd.out.log"

View File

@@ -0,0 +1,42 @@
# example with volumes, both blank and populated
kernel:
image: linuxkit/kernel:6.12.59
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
init:
- linuxkit/init:b5506cc74a6812dc40982cacfd2f4328f8a4b12a
- linuxkit/runc:9442aa234715e751a16144f1d4ae3fd1a00fd492
- linuxkit/containerd:ba19f64efd3331a8fd0a33e00eabd14f6ee1780e
- linuxkit/ca-certificates:256f1950df59f2f209e9f0b81374177409eb11de
onboot:
- name: sysctl
image: linuxkit/sysctl:43ac1d39da329c3567fcb9689e5ca99de6d169b6
- name: dhcpcd
image: linuxkit/dhcpcd:b87e9ececac55a65eaa592f4dd8b4e0c3009afdb
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
onshutdown:
- name: shutdown
image: busybox:latest
command: ["/bin/echo", "so long and thanks for all the fish"]
services:
- name: getty
image: linuxkit/getty:a86d74c8f89be8956330c3b115b0b1f2e09ef6e0
env:
- INSECURE=true
- name: rngd
image: linuxkit/rngd:984eb580ecb63986f07f626b61692a97aacd7198
- name: nginx
image: nginx:1.19.5-alpine
capabilities:
- CAP_NET_BIND_SERVICE
- CAP_CHOWN
- CAP_SETUID
- CAP_SETGID
- CAP_DAC_OVERRIDE
binds:
- /etc/resolv.conf:/etc/resolv.conf
files:
- path: etc/linuxkit-config
metadata: yaml
- path: /etc/containerd/runtime-config.toml
source: "containerd-debug-runtime-config.toml" # must include the file runtime-config.toml in this directory
mode: "0644"

View File

@@ -1,31 +1,31 @@
kernel:
image: linuxkit/kernel:6.6.13
image: linuxkit/kernel:6.12.59
cmdline: "console=tty0 console=ttyS0"
init:
- linuxkit/init:45a1ad5919f0b6acf0f0cf730e9434abfae11fe6
- linuxkit/runc:6062483d748609d505f2bcde4e52ee64a3329f5f
- linuxkit/containerd:e7a92d9f3282039eac5fb1b07cac2b8664cbf0ad
- linuxkit/ca-certificates:5aaa343474e5ac3ac01f8b917e82efb1063d80ff
- linuxkit/init:b5506cc74a6812dc40982cacfd2f4328f8a4b12a
- linuxkit/runc:9442aa234715e751a16144f1d4ae3fd1a00fd492
- linuxkit/containerd:ba19f64efd3331a8fd0a33e00eabd14f6ee1780e
- linuxkit/ca-certificates:256f1950df59f2f209e9f0b81374177409eb11de
onboot:
- name: sysctl
image: linuxkit/sysctl:5a374e4bf3e5a7deeacff6571d0f30f7ea8f56db
image: linuxkit/sysctl:43ac1d39da329c3567fcb9689e5ca99de6d169b6
- name: dhcpcd
image: linuxkit/dhcpcd:e9e3580f2de00e73e7b316a007186d22fea056ee
image: linuxkit/dhcpcd:b87e9ececac55a65eaa592f4dd8b4e0c3009afdb
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: format
image: linuxkit/format:e040f4f045f03138a1ee8a22bb6feae7fd5596a6
image: linuxkit/format:4f779c0b0d0ba145b7f03211b5cbf59fbbe12e54
command: ["/usr/bin/format", "/dev/sda"]
- name: mount
image: linuxkit/mount:19ff89c251a4156bda8ed11c95faad2f40eb770e
image: linuxkit/mount:bd1c3bb45e48e68e47a9456d1669f7119f855184
command: ["/usr/bin/mountie", "/dev/sda1", "/var/external"]
- name: loop
image: linuxkit/losetup:65e3ad6336a321749394f58c3f28003cfce1e28c
image: linuxkit/losetup:ba1b84df18e666b4b860c4c39fd4aedb228bee96
command: ["/usr/bin/loopy", "--create", "/var/external/storage_file"]
- name: dm-crypt
image: linuxkit/dm-crypt:d49723bc9d10c5ada9e03b0670f4e57416d5d084
image: linuxkit/dm-crypt:27e016fa7c12d6cfce0d045a65b112c787f6dc3c
command: ["/usr/bin/crypto", "crypt_loop_dev", "/dev/loop0"]
- name: mount
image: linuxkit/mount:19ff89c251a4156bda8ed11c95faad2f40eb770e
image: linuxkit/mount:bd1c3bb45e48e68e47a9456d1669f7119f855184
command: ["/usr/bin/mountie", "/dev/mapper/crypt_loop_dev", "/var/secure_storage"]
- name: bbox
image: busybox
@@ -34,11 +34,11 @@ onboot:
- /var:/var
services:
- name: getty
image: linuxkit/getty:5d86a2ce2d890c14ab66b13638dcadf74f29218b
image: linuxkit/getty:a86d74c8f89be8956330c3b115b0b1f2e09ef6e0
env:
- INSECURE=true
- name: rngd
image: linuxkit/rngd:cdb919e4aee49fed0bf6075f0a104037cba83c39
image: linuxkit/rngd:984eb580ecb63986f07f626b61692a97aacd7198
files:
- path: etc/dm-crypt/key
# the below key is just to keep the example self-contained

View File

@@ -1,25 +1,25 @@
kernel:
image: linuxkit/kernel:6.6.13
image: linuxkit/kernel:6.12.59
cmdline: "console=tty0 console=ttyS0"
init:
- linuxkit/init:45a1ad5919f0b6acf0f0cf730e9434abfae11fe6
- linuxkit/runc:6062483d748609d505f2bcde4e52ee64a3329f5f
- linuxkit/containerd:e7a92d9f3282039eac5fb1b07cac2b8664cbf0ad
- linuxkit/ca-certificates:5aaa343474e5ac3ac01f8b917e82efb1063d80ff
- linuxkit/init:b5506cc74a6812dc40982cacfd2f4328f8a4b12a
- linuxkit/runc:9442aa234715e751a16144f1d4ae3fd1a00fd492
- linuxkit/containerd:ba19f64efd3331a8fd0a33e00eabd14f6ee1780e
- linuxkit/ca-certificates:256f1950df59f2f209e9f0b81374177409eb11de
onboot:
- name: sysctl
image: linuxkit/sysctl:5a374e4bf3e5a7deeacff6571d0f30f7ea8f56db
image: linuxkit/sysctl:43ac1d39da329c3567fcb9689e5ca99de6d169b6
- name: dhcpcd
image: linuxkit/dhcpcd:e9e3580f2de00e73e7b316a007186d22fea056ee
image: linuxkit/dhcpcd:b87e9ececac55a65eaa592f4dd8b4e0c3009afdb
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: format
image: linuxkit/format:e040f4f045f03138a1ee8a22bb6feae7fd5596a6
image: linuxkit/format:4f779c0b0d0ba145b7f03211b5cbf59fbbe12e54
command: ["/usr/bin/format", "/dev/sda"]
- name: dm-crypt
image: linuxkit/dm-crypt:d49723bc9d10c5ada9e03b0670f4e57416d5d084
image: linuxkit/dm-crypt:27e016fa7c12d6cfce0d045a65b112c787f6dc3c
command: ["/usr/bin/crypto", "crypt_dev", "/dev/sda1"]
- name: mount
image: linuxkit/mount:19ff89c251a4156bda8ed11c95faad2f40eb770e
image: linuxkit/mount:bd1c3bb45e48e68e47a9456d1669f7119f855184
command: ["/usr/bin/mountie", "/dev/mapper/crypt_dev", "/var/secure_storage"]
- name: bbox
image: busybox
@@ -28,11 +28,11 @@ onboot:
- /var:/var
services:
- name: getty
image: linuxkit/getty:5d86a2ce2d890c14ab66b13638dcadf74f29218b
image: linuxkit/getty:a86d74c8f89be8956330c3b115b0b1f2e09ef6e0
env:
- INSECURE=true
- name: rngd
image: linuxkit/rngd:cdb919e4aee49fed0bf6075f0a104037cba83c39
image: linuxkit/rngd:984eb580ecb63986f07f626b61692a97aacd7198
files:
- path: etc/dm-crypt/key
# the below key is just to keep the example self-contained

View File

@@ -1,32 +1,32 @@
# This is an example for building the open source components of Docker for Mac
kernel:
image: linuxkit/kernel:6.6.13
image: linuxkit/kernel:6.12.59
cmdline: "console=ttyS0 page_poison=1"
init:
- linuxkit/vpnkit-expose-port:77e45e4681c78d59f1d8a48818260948d55f9d05 # install vpnkit-expose-port and vpnkit-iptables-wrapper on host
- linuxkit/init:45a1ad5919f0b6acf0f0cf730e9434abfae11fe6
- linuxkit/runc:6062483d748609d505f2bcde4e52ee64a3329f5f
- linuxkit/containerd:e7a92d9f3282039eac5fb1b07cac2b8664cbf0ad
- linuxkit/ca-certificates:5aaa343474e5ac3ac01f8b917e82efb1063d80ff
- linuxkit/vpnkit-expose-port:19c9fd4180d33c9b434fd73b1a3a7ab83cadbf30 # install vpnkit-expose-port and vpnkit-iptables-wrapper on host
- linuxkit/init:b5506cc74a6812dc40982cacfd2f4328f8a4b12a
- linuxkit/runc:9442aa234715e751a16144f1d4ae3fd1a00fd492
- linuxkit/containerd:ba19f64efd3331a8fd0a33e00eabd14f6ee1780e
- linuxkit/ca-certificates:256f1950df59f2f209e9f0b81374177409eb11de
onboot:
# support metadata for optional config in /run/config
- name: metadata
image: linuxkit/metadata:b082f1bf97a9034d1e4c0e36a5d2923f4e58f540
image: linuxkit/metadata:4bbf406678d376e1ae9c9efae6ca2421f63fb4ff
- name: sysctl
image: linuxkit/sysctl:5a374e4bf3e5a7deeacff6571d0f30f7ea8f56db
image: linuxkit/sysctl:43ac1d39da329c3567fcb9689e5ca99de6d169b6
- name: sysfs
image: linuxkit/sysfs:ec174e06ca756f492e7a3fd6200d5c1672b97511
image: linuxkit/sysfs:6d5bd933762f6b216744c711c6e876756cee9600
- name: binfmt
image: linuxkit/binfmt:68604c81876812ca1c9e2d9f098c28f463713e61
image: linuxkit/binfmt:4924dc6b9aa7e0bcc6fe8825c24471eac4684108
# Format and mount the disk image in /var/lib/docker
- name: format
image: linuxkit/format:e040f4f045f03138a1ee8a22bb6feae7fd5596a6
image: linuxkit/format:4f779c0b0d0ba145b7f03211b5cbf59fbbe12e54
- name: mount
image: linuxkit/mount:19ff89c251a4156bda8ed11c95faad2f40eb770e
image: linuxkit/mount:bd1c3bb45e48e68e47a9456d1669f7119f855184
command: ["/usr/bin/mountie", "/var/lib"]
# make a swap file on the mounted disk
- name: swap
image: linuxkit/swap:c57f3319ce770515357f0058035e40519c22b752
image: linuxkit/swap:7e19e5e69370e82b90a110093441abbf5e70638b
command: ["/swap.sh", "--path", "/var/lib/swap", "--size", "1024M"]
# mount-vpnkit mounts the 9p share used by vpnkit to coordinate port forwarding
- name: mount-vpnkit
@@ -44,41 +44,41 @@ onboot:
- /var:/host_var
command: ["sh", "-c", "mv -v /host_var/log /host_var/lib && ln -vs /var/lib/log /host_var/log"]
- name: dhcpcd
image: linuxkit/dhcpcd:e9e3580f2de00e73e7b316a007186d22fea056ee
image: linuxkit/dhcpcd:b87e9ececac55a65eaa592f4dd8b4e0c3009afdb
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
services:
# Enable acpi to shutdown on power events
- name: acpid
image: linuxkit/acpid:3b1560c81d3884e049ebbd9d9bf94ccb394e6cd3
image: linuxkit/acpid:dbd30b25903bf17042c22171b729f94c4bd3d98d
# Enable getty for easier debugging
- name: getty
image: linuxkit/getty:5d86a2ce2d890c14ab66b13638dcadf74f29218b
image: linuxkit/getty:a86d74c8f89be8956330c3b115b0b1f2e09ef6e0
env:
- INSECURE=true
# Run ntpd to keep time synchronised in the VM
- name: ntpd
image: linuxkit/openntpd:c90c6dd90f5dfb0ca71a73aac2dad69c8d956af3
image: linuxkit/openntpd:2508f1d040441457a0b3e75744878afdf61bc473
# VSOCK to unix domain socket forwarding. Forwards guest /var/run/docker.sock
# to a socket on the host.
- name: vsudd
image: linuxkit/vsudd:b4d80d243733f80906cdbcf77f367a7b5744dc09
image: linuxkit/vsudd:b227ed955d14720fcb99f0e1fbd69fbc1dea3106
binds:
- /var/run:/var/run
command: ["/vsudd", "-inport", "2376:unix:/var/run/docker.sock"]
# vpnkit-forwarder forwards network traffic to/from the host via VSOCK port 62373.
# It needs access to the vpnkit 9P coordination share
- name: vpnkit-forwarder
image: linuxkit/vpnkit-forwarder:a89ec807d7d675dccd53773c07382bc707db3396
image: linuxkit/vpnkit-forwarder:d0bc6500a9dc97b4556bb4bda20160a294cc61a3
binds:
- /var/vpnkit:/port
net: host
command: ["/vpnkit-forwarder", "-vsockPort", "62373"]
# Monitor for image deletes and invoke a TRIM on the container filesystem
- name: trim-after-delete
image: linuxkit/trim-after-delete:6ba98bfb111a808b7a1ca890aca9fc2b3709fca2
image: linuxkit/trim-after-delete:012784ce3bdd59d42799dbf6555fe6da972cc721
# When the host resumes from sleep, force a clock resync
- name: host-timesync-daemon
image: linuxkit/host-timesync-daemon:12d443511194774a9fdaf5457e5f2703fd5e882c
image: linuxkit/host-timesync-daemon:288c5bf6d7cd40b76d7a2276435c3c011cb26e37
# Run dockerd with the vpnkit userland proxy from the vpnkit-forwarder container.
# Bind mounts /var/run to allow vsudd to connect to docker.sock, /var/vpnkit
# for vpnkit coordination and /run/config/docker for the configuration file.

View File

@@ -1,32 +1,32 @@
kernel:
image: linuxkit/kernel:6.6.13
image: linuxkit/kernel:6.12.59
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0 console=ttysclp0"
init:
- linuxkit/init:45a1ad5919f0b6acf0f0cf730e9434abfae11fe6
- linuxkit/runc:6062483d748609d505f2bcde4e52ee64a3329f5f
- linuxkit/containerd:e7a92d9f3282039eac5fb1b07cac2b8664cbf0ad
- linuxkit/ca-certificates:5aaa343474e5ac3ac01f8b917e82efb1063d80ff
- linuxkit/init:b5506cc74a6812dc40982cacfd2f4328f8a4b12a
- linuxkit/runc:9442aa234715e751a16144f1d4ae3fd1a00fd492
- linuxkit/containerd:ba19f64efd3331a8fd0a33e00eabd14f6ee1780e
- linuxkit/ca-certificates:256f1950df59f2f209e9f0b81374177409eb11de
onboot:
- name: sysctl
image: linuxkit/sysctl:5a374e4bf3e5a7deeacff6571d0f30f7ea8f56db
image: linuxkit/sysctl:43ac1d39da329c3567fcb9689e5ca99de6d169b6
- name: sysfs
image: linuxkit/sysfs:ec174e06ca756f492e7a3fd6200d5c1672b97511
image: linuxkit/sysfs:6d5bd933762f6b216744c711c6e876756cee9600
- name: format
image: linuxkit/format:e040f4f045f03138a1ee8a22bb6feae7fd5596a6
image: linuxkit/format:4f779c0b0d0ba145b7f03211b5cbf59fbbe12e54
- name: mount
image: linuxkit/mount:19ff89c251a4156bda8ed11c95faad2f40eb770e
image: linuxkit/mount:bd1c3bb45e48e68e47a9456d1669f7119f855184
command: ["/usr/bin/mountie", "/var/lib/docker"]
services:
- name: getty
image: linuxkit/getty:5d86a2ce2d890c14ab66b13638dcadf74f29218b
image: linuxkit/getty:a86d74c8f89be8956330c3b115b0b1f2e09ef6e0
env:
- INSECURE=true
- name: rngd
image: linuxkit/rngd:cdb919e4aee49fed0bf6075f0a104037cba83c39
image: linuxkit/rngd:984eb580ecb63986f07f626b61692a97aacd7198
- name: dhcpcd
image: linuxkit/dhcpcd:e9e3580f2de00e73e7b316a007186d22fea056ee
image: linuxkit/dhcpcd:b87e9ececac55a65eaa592f4dd8b4e0c3009afdb
- name: ntpd
image: linuxkit/openntpd:c90c6dd90f5dfb0ca71a73aac2dad69c8d956af3
image: linuxkit/openntpd:2508f1d040441457a0b3e75744878afdf61bc473
- name: docker
image: docker:20.10.6-dind
capabilities:

View File

@@ -1,25 +1,25 @@
kernel:
image: linuxkit/kernel:6.6.13
image: linuxkit/kernel:6.12.59
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0 console=ttysclp0"
init:
- linuxkit/init:45a1ad5919f0b6acf0f0cf730e9434abfae11fe6
- linuxkit/runc:6062483d748609d505f2bcde4e52ee64a3329f5f
- linuxkit/containerd:e7a92d9f3282039eac5fb1b07cac2b8664cbf0ad
- linuxkit/ca-certificates:5aaa343474e5ac3ac01f8b917e82efb1063d80ff
- linuxkit/init:b5506cc74a6812dc40982cacfd2f4328f8a4b12a
- linuxkit/runc:9442aa234715e751a16144f1d4ae3fd1a00fd492
- linuxkit/containerd:ba19f64efd3331a8fd0a33e00eabd14f6ee1780e
- linuxkit/ca-certificates:256f1950df59f2f209e9f0b81374177409eb11de
onboot:
- name: sysctl
image: linuxkit/sysctl:5a374e4bf3e5a7deeacff6571d0f30f7ea8f56db
image: linuxkit/sysctl:43ac1d39da329c3567fcb9689e5ca99de6d169b6
- name: dhcpcd
image: linuxkit/dhcpcd:e9e3580f2de00e73e7b316a007186d22fea056ee
image: linuxkit/dhcpcd:b87e9ececac55a65eaa592f4dd8b4e0c3009afdb
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
services:
- name: getty
image: linuxkit/getty:5d86a2ce2d890c14ab66b13638dcadf74f29218b
image: linuxkit/getty:a86d74c8f89be8956330c3b115b0b1f2e09ef6e0
# to make insecure with passwordless root login, uncomment following lines
#env:
# - INSECURE=true
- name: rngd
image: linuxkit/rngd:cdb919e4aee49fed0bf6075f0a104037cba83c39
image: linuxkit/rngd:984eb580ecb63986f07f626b61692a97aacd7198
files:
- path: etc/getty.shadow
# sample sets password for root to "abcdefgh" (without quotes)

View File

@@ -1,16 +1,16 @@
kernel:
image: linuxkit/kernel:6.6.13
image: linuxkit/kernel:6.12.59
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0 console=ttysclp0"
init:
- linuxkit/init:45a1ad5919f0b6acf0f0cf730e9434abfae11fe6
- linuxkit/runc:6062483d748609d505f2bcde4e52ee64a3329f5f
- linuxkit/containerd:e7a92d9f3282039eac5fb1b07cac2b8664cbf0ad
- linuxkit/ca-certificates:5aaa343474e5ac3ac01f8b917e82efb1063d80ff
- linuxkit/init:b5506cc74a6812dc40982cacfd2f4328f8a4b12a
- linuxkit/runc:9442aa234715e751a16144f1d4ae3fd1a00fd492
- linuxkit/containerd:ba19f64efd3331a8fd0a33e00eabd14f6ee1780e
- linuxkit/ca-certificates:256f1950df59f2f209e9f0b81374177409eb11de
onboot:
- name: sysctl
image: linuxkit/sysctl:5a374e4bf3e5a7deeacff6571d0f30f7ea8f56db
image: linuxkit/sysctl:43ac1d39da329c3567fcb9689e5ca99de6d169b6
- name: dhcpcd
image: linuxkit/dhcpcd:e9e3580f2de00e73e7b316a007186d22fea056ee
image: linuxkit/dhcpcd:b87e9ececac55a65eaa592f4dd8b4e0c3009afdb
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
onshutdown:
- name: shutdown
@@ -18,7 +18,7 @@ onshutdown:
command: ["/bin/echo", "so long and thanks for all the fish"]
services:
- name: getty
image: linuxkit/getty:5d86a2ce2d890c14ab66b13638dcadf74f29218b
image: linuxkit/getty:a86d74c8f89be8956330c3b115b0b1f2e09ef6e0
env:
- INSECURE=true
runtime:
@@ -30,7 +30,7 @@ services:
destination: writeable-host-etc
options: ["rw", "lowerdir=/etc", "upperdir=/run/hostetc/upper", "workdir=/run/hostetc/work"]
- name: rngd
image: linuxkit/rngd:cdb919e4aee49fed0bf6075f0a104037cba83c39
image: linuxkit/rngd:984eb580ecb63986f07f626b61692a97aacd7198
- name: nginx
image: nginx:1.13.8-alpine
capabilities:

View File

@@ -1,18 +1,18 @@
kernel:
image: linuxkit/kernel:6.6.13
image: linuxkit/kernel:6.12.59
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
init:
- linuxkit/init:45a1ad5919f0b6acf0f0cf730e9434abfae11fe6
- linuxkit/runc:6062483d748609d505f2bcde4e52ee64a3329f5f
- linuxkit/containerd:e7a92d9f3282039eac5fb1b07cac2b8664cbf0ad
- linuxkit/ca-certificates:5aaa343474e5ac3ac01f8b917e82efb1063d80ff
- linuxkit/init:b5506cc74a6812dc40982cacfd2f4328f8a4b12a
- linuxkit/runc:9442aa234715e751a16144f1d4ae3fd1a00fd492
- linuxkit/containerd:ba19f64efd3331a8fd0a33e00eabd14f6ee1780e
- linuxkit/ca-certificates:256f1950df59f2f209e9f0b81374177409eb11de
onboot:
- name: dhcpcd
image: linuxkit/dhcpcd:e9e3580f2de00e73e7b316a007186d22fea056ee
image: linuxkit/dhcpcd:b87e9ececac55a65eaa592f4dd8b4e0c3009afdb
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
services:
- name: getty
image: linuxkit/getty:5d86a2ce2d890c14ab66b13638dcadf74f29218b
image: linuxkit/getty:a86d74c8f89be8956330c3b115b0b1f2e09ef6e0
env:
- INSECURE=true
- name: influxdb

View File

@@ -1,23 +1,23 @@
# Simple example of using an external logging service
kernel:
image: linuxkit/kernel:6.6.13
image: linuxkit/kernel:6.12.59
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
init:
- linuxkit/init:45a1ad5919f0b6acf0f0cf730e9434abfae11fe6
- linuxkit/runc:6062483d748609d505f2bcde4e52ee64a3329f5f
- linuxkit/containerd:e7a92d9f3282039eac5fb1b07cac2b8664cbf0ad
- linuxkit/ca-certificates:5aaa343474e5ac3ac01f8b917e82efb1063d80ff
- linuxkit/memlogd:cb79fd19e6485cfc61b85c607ca172cd860554c5
- linuxkit/init:b5506cc74a6812dc40982cacfd2f4328f8a4b12a
- linuxkit/runc:9442aa234715e751a16144f1d4ae3fd1a00fd492
- linuxkit/containerd:ba19f64efd3331a8fd0a33e00eabd14f6ee1780e
- linuxkit/ca-certificates:256f1950df59f2f209e9f0b81374177409eb11de
- linuxkit/memlogd:19b0fdec83dded95e0a2f97a8ca6868f5e83c401
onboot:
- name: sysctl
image: linuxkit/sysctl:5a374e4bf3e5a7deeacff6571d0f30f7ea8f56db
image: linuxkit/sysctl:43ac1d39da329c3567fcb9689e5ca99de6d169b6
- name: dhcpcd
image: linuxkit/dhcpcd:e9e3580f2de00e73e7b316a007186d22fea056ee
image: linuxkit/dhcpcd:b87e9ececac55a65eaa592f4dd8b4e0c3009afdb
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
services:
# Inside the getty type `/proc/1/root/usr/bin/logread -F` to follow the log
- name: getty
image: linuxkit/getty:5d86a2ce2d890c14ab66b13638dcadf74f29218b
image: linuxkit/getty:a86d74c8f89be8956330c3b115b0b1f2e09ef6e0
env:
- INSECURE=true
# A service which generates log messages for testing
@@ -25,6 +25,6 @@ services:
image: alpine:3.13
command: ["/bin/sh", "-c", "while /bin/true; do echo hello $(date); sleep 1; done" ]
- name: write-and-rotate-logs
image: linuxkit/logwrite:c1c66d246080a40658903916d650206f2dcd707a
image: linuxkit/logwrite:24e6a76c2d45a7679d4f53db9ea377373b543dc7
- name: kmsg
image: linuxkit/kmsg:423844f262467e1199480dc93d69e38610c78133
image: linuxkit/kmsg:c4d8d509cf496faa21c184ae7fdff6fddc6e186d

View File

@@ -1,16 +1,16 @@
kernel:
image: linuxkit/kernel:6.6.13
image: linuxkit/kernel:6.12.59
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
init:
- linuxkit/init:45a1ad5919f0b6acf0f0cf730e9434abfae11fe6
- linuxkit/runc:6062483d748609d505f2bcde4e52ee64a3329f5f
- linuxkit/containerd:e7a92d9f3282039eac5fb1b07cac2b8664cbf0ad
- linuxkit/init:b5506cc74a6812dc40982cacfd2f4328f8a4b12a
- linuxkit/runc:9442aa234715e751a16144f1d4ae3fd1a00fd492
- linuxkit/containerd:ba19f64efd3331a8fd0a33e00eabd14f6ee1780e
onboot:
- name: dhcpcd
image: linuxkit/dhcpcd:e9e3580f2de00e73e7b316a007186d22fea056ee
image: linuxkit/dhcpcd:b87e9ececac55a65eaa592f4dd8b4e0c3009afdb
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
services:
- name: getty
image: linuxkit/getty:5d86a2ce2d890c14ab66b13638dcadf74f29218b
image: linuxkit/getty:a86d74c8f89be8956330c3b115b0b1f2e09ef6e0
env:
- INSECURE=true

View File

@@ -1,18 +1,18 @@
kernel:
image: linuxkit/kernel:6.6.13
image: linuxkit/kernel:6.12.59
cmdline: "console=tty0 console=ttyS0"
init:
- linuxkit/init:45a1ad5919f0b6acf0f0cf730e9434abfae11fe6
- linuxkit/runc:6062483d748609d505f2bcde4e52ee64a3329f5f
- linuxkit/containerd:e7a92d9f3282039eac5fb1b07cac2b8664cbf0ad
- linuxkit/init:b5506cc74a6812dc40982cacfd2f4328f8a4b12a
- linuxkit/runc:9442aa234715e751a16144f1d4ae3fd1a00fd492
- linuxkit/containerd:ba19f64efd3331a8fd0a33e00eabd14f6ee1780e
services:
- name: getty
image: linuxkit/getty:5d86a2ce2d890c14ab66b13638dcadf74f29218b
image: linuxkit/getty:a86d74c8f89be8956330c3b115b0b1f2e09ef6e0
env:
- INSECURE=true
- name: rngd
image: linuxkit/rngd:cdb919e4aee49fed0bf6075f0a104037cba83c39
image: linuxkit/rngd:984eb580ecb63986f07f626b61692a97aacd7198
- name: dhcpcd
image: linuxkit/dhcpcd:e9e3580f2de00e73e7b316a007186d22fea056ee
image: linuxkit/dhcpcd:b87e9ececac55a65eaa592f4dd8b4e0c3009afdb
- name: node_exporter
image: linuxkit/node_exporter:9bcd8479b7ba2844773ef4f01a60c901c4800982
image: linuxkit/node_exporter:f334791f344bdf477317840e14cee57904fee95a

View File

@@ -1,25 +1,25 @@
kernel:
image: linuxkit/kernel:6.6.13
image: linuxkit/kernel:6.12.59
cmdline: "console=ttyS0"
init:
- linuxkit/init:45a1ad5919f0b6acf0f0cf730e9434abfae11fe6
- linuxkit/runc:6062483d748609d505f2bcde4e52ee64a3329f5f
- linuxkit/containerd:e7a92d9f3282039eac5fb1b07cac2b8664cbf0ad
- linuxkit/ca-certificates:5aaa343474e5ac3ac01f8b917e82efb1063d80ff
- linuxkit/init:b5506cc74a6812dc40982cacfd2f4328f8a4b12a
- linuxkit/runc:9442aa234715e751a16144f1d4ae3fd1a00fd492
- linuxkit/containerd:ba19f64efd3331a8fd0a33e00eabd14f6ee1780e
- linuxkit/ca-certificates:256f1950df59f2f209e9f0b81374177409eb11de
onboot:
- name: sysctl
image: linuxkit/sysctl:5a374e4bf3e5a7deeacff6571d0f30f7ea8f56db
image: linuxkit/sysctl:43ac1d39da329c3567fcb9689e5ca99de6d169b6
- name: dhcpcd
image: linuxkit/dhcpcd:e9e3580f2de00e73e7b316a007186d22fea056ee
image: linuxkit/dhcpcd:b87e9ececac55a65eaa592f4dd8b4e0c3009afdb
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: metadata
image: linuxkit/metadata:b082f1bf97a9034d1e4c0e36a5d2923f4e58f540
image: linuxkit/metadata:4bbf406678d376e1ae9c9efae6ca2421f63fb4ff
command: ["/usr/bin/metadata", "openstack"]
services:
- name: rngd
image: linuxkit/rngd:cdb919e4aee49fed0bf6075f0a104037cba83c39
image: linuxkit/rngd:984eb580ecb63986f07f626b61692a97aacd7198
- name: sshd
image: linuxkit/sshd:75f399fbfb6455dfccd4cb30543d0b4b494d28c8
image: linuxkit/sshd:08e5d4a46603eff485d5d1b14001cc932a530858
binds.add:
- /run/config/ssh/authorized_keys:/root/.ssh/authorized_keys
- name: nginx

View File

@@ -1,27 +1,27 @@
kernel:
image: linuxkit/kernel:6.6.13
image: linuxkit/kernel:6.12.59
cmdline: "console=ttyS0"
init:
- linuxkit/init:45a1ad5919f0b6acf0f0cf730e9434abfae11fe6
- linuxkit/runc:6062483d748609d505f2bcde4e52ee64a3329f5f
- linuxkit/containerd:e7a92d9f3282039eac5fb1b07cac2b8664cbf0ad
- linuxkit/ca-certificates:5aaa343474e5ac3ac01f8b917e82efb1063d80ff
- linuxkit/init:b5506cc74a6812dc40982cacfd2f4328f8a4b12a
- linuxkit/runc:9442aa234715e751a16144f1d4ae3fd1a00fd492
- linuxkit/containerd:ba19f64efd3331a8fd0a33e00eabd14f6ee1780e
- linuxkit/ca-certificates:256f1950df59f2f209e9f0b81374177409eb11de
onboot:
- name: sysctl
image: linuxkit/sysctl:5a374e4bf3e5a7deeacff6571d0f30f7ea8f56db
image: linuxkit/sysctl:43ac1d39da329c3567fcb9689e5ca99de6d169b6
- name: dhcpcd
image: linuxkit/dhcpcd:e9e3580f2de00e73e7b316a007186d22fea056ee
image: linuxkit/dhcpcd:b87e9ececac55a65eaa592f4dd8b4e0c3009afdb
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: metadata
image: linuxkit/metadata:b082f1bf97a9034d1e4c0e36a5d2923f4e58f540
image: linuxkit/metadata:4bbf406678d376e1ae9c9efae6ca2421f63fb4ff
services:
- name: rngd
image: linuxkit/rngd:cdb919e4aee49fed0bf6075f0a104037cba83c39
image: linuxkit/rngd:984eb580ecb63986f07f626b61692a97aacd7198
- name: dhcpcd2
image: linuxkit/dhcpcd:e9e3580f2de00e73e7b316a007186d22fea056ee
image: linuxkit/dhcpcd:b87e9ececac55a65eaa592f4dd8b4e0c3009afdb
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf"]
- name: sshd
image: linuxkit/sshd:75f399fbfb6455dfccd4cb30543d0b4b494d28c8
image: linuxkit/sshd:08e5d4a46603eff485d5d1b14001cc932a530858
binds.add:
- /run/config/ssh/authorized_keys:/root/.ssh/authorized_keys
- name: nginx

View File

@@ -1,21 +1,21 @@
kernel:
image: linuxkit/kernel:6.6.13
image: linuxkit/kernel:6.12.59
cmdline: "console=ttyS0"
init:
- linuxkit/init:45a1ad5919f0b6acf0f0cf730e9434abfae11fe6
- linuxkit/runc:6062483d748609d505f2bcde4e52ee64a3329f5f
- linuxkit/containerd:e7a92d9f3282039eac5fb1b07cac2b8664cbf0ad
- linuxkit/ca-certificates:5aaa343474e5ac3ac01f8b917e82efb1063d80ff
- linuxkit/init:b5506cc74a6812dc40982cacfd2f4328f8a4b12a
- linuxkit/runc:9442aa234715e751a16144f1d4ae3fd1a00fd492
- linuxkit/containerd:ba19f64efd3331a8fd0a33e00eabd14f6ee1780e
- linuxkit/ca-certificates:256f1950df59f2f209e9f0b81374177409eb11de
onboot:
- name: sysctl
image: linuxkit/sysctl:5a374e4bf3e5a7deeacff6571d0f30f7ea8f56db
image: linuxkit/sysctl:43ac1d39da329c3567fcb9689e5ca99de6d169b6
services:
- name: rngd
image: linuxkit/rngd:cdb919e4aee49fed0bf6075f0a104037cba83c39
image: linuxkit/rngd:984eb580ecb63986f07f626b61692a97aacd7198
- name: dhcpcd
image: linuxkit/dhcpcd:e9e3580f2de00e73e7b316a007186d22fea056ee
image: linuxkit/dhcpcd:b87e9ececac55a65eaa592f4dd8b4e0c3009afdb
- name: sshd
image: linuxkit/sshd:75f399fbfb6455dfccd4cb30543d0b4b494d28c8
image: linuxkit/sshd:08e5d4a46603eff485d5d1b14001cc932a530858
binds.add:
- /root/.ssh:/root/.ssh
files:

View File

@@ -0,0 +1,14 @@
# This YAML snippet is to be used in conjunction with equinixmetal.yml to
# build a arm64 image for Equinix Metal. It adds a modprobe of the NIC
# driver and overrides the kernel section to disable prepending the
# Intel CPU microcode to the initrd. If writing a YAML specifically
# for arm64 then the 'ucode' line in the kernel section can be left
# out.
kernel:
image: linuxkit/kernel:6.12.59
cmdline: "console=ttyAMA0"
ucode: ""
onboot:
- name: modprobe
image: linuxkit/modprobe:4248cdc3494779010e7e7488fc17b6fd45b73aeb
command: ["modprobe", "nicvf"]

View File

@@ -0,0 +1,38 @@
kernel:
image: linuxkit/kernel:6.12.59
cmdline: console=ttyS1
ucode: intel-ucode.cpio
init:
- linuxkit/init:b5506cc74a6812dc40982cacfd2f4328f8a4b12a
- linuxkit/runc:9442aa234715e751a16144f1d4ae3fd1a00fd492
- linuxkit/containerd:ba19f64efd3331a8fd0a33e00eabd14f6ee1780e
- linuxkit/ca-certificates:256f1950df59f2f209e9f0b81374177409eb11de
- linuxkit/firmware:68c2b29f28f2639020b9f8d55254d333498a30aa
onboot:
- name: rngd1
image: linuxkit/rngd:984eb580ecb63986f07f626b61692a97aacd7198
command: ["/sbin/rngd", "-1"]
- name: sysctl
image: linuxkit/sysctl:43ac1d39da329c3567fcb9689e5ca99de6d169b6
- name: dhcpcd
image: linuxkit/dhcpcd:b87e9ececac55a65eaa592f4dd8b4e0c3009afdb
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: metadata
image: linuxkit/metadata:4bbf406678d376e1ae9c9efae6ca2421f63fb4ff
command: ["/usr/bin/metadata", "equinixmetal"]
services:
- name: rngd
image: linuxkit/rngd:984eb580ecb63986f07f626b61692a97aacd7198
- name: getty
image: linuxkit/getty:a86d74c8f89be8956330c3b115b0b1f2e09ef6e0
env:
- INSECURE=true
- name: sshd
image: linuxkit/sshd:08e5d4a46603eff485d5d1b14001cc932a530858
binds.add:
- /root/.ssh:/root/.ssh
files:
- path: root/.ssh/authorized_keys
source: ~/.ssh/id_rsa.pub
mode: "0600"
optional: true

View File

@@ -1,28 +1,28 @@
kernel:
image: linuxkit/kernel:6.6.13
image: linuxkit/kernel:6.12.59
cmdline: "console=ttyS0"
init:
- linuxkit/init:45a1ad5919f0b6acf0f0cf730e9434abfae11fe6
- linuxkit/runc:6062483d748609d505f2bcde4e52ee64a3329f5f
- linuxkit/containerd:e7a92d9f3282039eac5fb1b07cac2b8664cbf0ad
- linuxkit/ca-certificates:5aaa343474e5ac3ac01f8b917e82efb1063d80ff
- linuxkit/init:b5506cc74a6812dc40982cacfd2f4328f8a4b12a
- linuxkit/runc:9442aa234715e751a16144f1d4ae3fd1a00fd492
- linuxkit/containerd:ba19f64efd3331a8fd0a33e00eabd14f6ee1780e
- linuxkit/ca-certificates:256f1950df59f2f209e9f0b81374177409eb11de
onboot:
- name: sysctl
image: linuxkit/sysctl:5a374e4bf3e5a7deeacff6571d0f30f7ea8f56db
image: linuxkit/sysctl:43ac1d39da329c3567fcb9689e5ca99de6d169b6
- name: dhcpcd
image: linuxkit/dhcpcd:e9e3580f2de00e73e7b316a007186d22fea056ee
image: linuxkit/dhcpcd:b87e9ececac55a65eaa592f4dd8b4e0c3009afdb
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: metadata
image: linuxkit/metadata:b082f1bf97a9034d1e4c0e36a5d2923f4e58f540
image: linuxkit/metadata:4bbf406678d376e1ae9c9efae6ca2421f63fb4ff
services:
- name: getty
image: linuxkit/getty:5d86a2ce2d890c14ab66b13638dcadf74f29218b
image: linuxkit/getty:a86d74c8f89be8956330c3b115b0b1f2e09ef6e0
env:
- INSECURE=true
- name: rngd
image: linuxkit/rngd:cdb919e4aee49fed0bf6075f0a104037cba83c39
image: linuxkit/rngd:984eb580ecb63986f07f626b61692a97aacd7198
- name: sshd
image: linuxkit/sshd:75f399fbfb6455dfccd4cb30543d0b4b494d28c8
image: linuxkit/sshd:08e5d4a46603eff485d5d1b14001cc932a530858
binds.add:
- /run/config/ssh/authorized_keys:/root/.ssh/authorized_keys
- name: nginx

View File

@@ -1,34 +1,34 @@
kernel:
image: linuxkit/kernel:6.6.13
image: linuxkit/kernel:6.12.59
cmdline: console=ttyS1
ucode: intel-ucode.cpio
init:
- linuxkit/init:45a1ad5919f0b6acf0f0cf730e9434abfae11fe6
- linuxkit/runc:6062483d748609d505f2bcde4e52ee64a3329f5f
- linuxkit/containerd:e7a92d9f3282039eac5fb1b07cac2b8664cbf0ad
- linuxkit/ca-certificates:5aaa343474e5ac3ac01f8b917e82efb1063d80ff
- linuxkit/firmware:8def159583422181ddee3704f7024ecb9c02d348
- linuxkit/init:b5506cc74a6812dc40982cacfd2f4328f8a4b12a
- linuxkit/runc:9442aa234715e751a16144f1d4ae3fd1a00fd492
- linuxkit/containerd:ba19f64efd3331a8fd0a33e00eabd14f6ee1780e
- linuxkit/ca-certificates:256f1950df59f2f209e9f0b81374177409eb11de
- linuxkit/firmware:68c2b29f28f2639020b9f8d55254d333498a30aa
onboot:
- name: rngd1
image: linuxkit/rngd:cdb919e4aee49fed0bf6075f0a104037cba83c39
image: linuxkit/rngd:984eb580ecb63986f07f626b61692a97aacd7198
command: ["/sbin/rngd", "-1"]
- name: sysctl
image: linuxkit/sysctl:5a374e4bf3e5a7deeacff6571d0f30f7ea8f56db
image: linuxkit/sysctl:43ac1d39da329c3567fcb9689e5ca99de6d169b6
- name: dhcpcd
image: linuxkit/dhcpcd:e9e3580f2de00e73e7b316a007186d22fea056ee
image: linuxkit/dhcpcd:b87e9ececac55a65eaa592f4dd8b4e0c3009afdb
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: metadata
image: linuxkit/metadata:b082f1bf97a9034d1e4c0e36a5d2923f4e58f540
image: linuxkit/metadata:4bbf406678d376e1ae9c9efae6ca2421f63fb4ff
command: ["/usr/bin/metadata", "hetzner"]
services:
- name: rngd
image: linuxkit/rngd:cdb919e4aee49fed0bf6075f0a104037cba83c39
image: linuxkit/rngd:984eb580ecb63986f07f626b61692a97aacd7198
- name: getty
image: linuxkit/getty:5d86a2ce2d890c14ab66b13638dcadf74f29218b
image: linuxkit/getty:a86d74c8f89be8956330c3b115b0b1f2e09ef6e0
env:
- INSECURE=true
- name: sshd
image: linuxkit/sshd:75f399fbfb6455dfccd4cb30543d0b4b494d28c8
image: linuxkit/sshd:08e5d4a46603eff485d5d1b14001cc932a530858
binds.add:
- /root/.ssh:/root/.ssh
files:

View File

@@ -1,14 +0,0 @@
# This YAML snippet is to be used in conjunction with packet.yml to
# build a arm64 image for packet.net. It adds a modprobe of the NIC
# driver and overrides the kernel section to disable prepending the
# Intel CPU microcode to the initrd. If writing a YAML specifically
# for arm64 then the 'ucode' line in the kernel section can be left
# out.
kernel:
image: linuxkit/kernel:6.6.13
cmdline: "console=ttyAMA0"
ucode: ""
onboot:
- name: modprobe
image: linuxkit/modprobe:ab5ac4d5e7e7a5f2d103764850f7846b69230676
command: ["modprobe", "nicvf"]

View File

@@ -1,38 +0,0 @@
kernel:
image: linuxkit/kernel:6.6.13
cmdline: console=ttyS1
ucode: intel-ucode.cpio
init:
- linuxkit/init:45a1ad5919f0b6acf0f0cf730e9434abfae11fe6
- linuxkit/runc:6062483d748609d505f2bcde4e52ee64a3329f5f
- linuxkit/containerd:e7a92d9f3282039eac5fb1b07cac2b8664cbf0ad
- linuxkit/ca-certificates:5aaa343474e5ac3ac01f8b917e82efb1063d80ff
- linuxkit/firmware:8def159583422181ddee3704f7024ecb9c02d348
onboot:
- name: rngd1
image: linuxkit/rngd:cdb919e4aee49fed0bf6075f0a104037cba83c39
command: ["/sbin/rngd", "-1"]
- name: sysctl
image: linuxkit/sysctl:5a374e4bf3e5a7deeacff6571d0f30f7ea8f56db
- name: dhcpcd
image: linuxkit/dhcpcd:e9e3580f2de00e73e7b316a007186d22fea056ee
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: metadata
image: linuxkit/metadata:b082f1bf97a9034d1e4c0e36a5d2923f4e58f540
command: ["/usr/bin/metadata", "packet"]
services:
- name: rngd
image: linuxkit/rngd:cdb919e4aee49fed0bf6075f0a104037cba83c39
- name: getty
image: linuxkit/getty:5d86a2ce2d890c14ab66b13638dcadf74f29218b
env:
- INSECURE=true
- name: sshd
image: linuxkit/sshd:75f399fbfb6455dfccd4cb30543d0b4b494d28c8
binds.add:
- /root/.ssh:/root/.ssh
files:
- path: root/.ssh/authorized_keys
source: ~/.ssh/id_rsa.pub
mode: "0600"
optional: true

View File

@@ -1,25 +1,25 @@
kernel:
image: linuxkit/kernel:6.6.13-rt
image: linuxkit/kernel:6.6.71-rt
cmdline: "console=tty0"
init:
- linuxkit/init:45a1ad5919f0b6acf0f0cf730e9434abfae11fe6
- linuxkit/runc:6062483d748609d505f2bcde4e52ee64a3329f5f
- linuxkit/containerd:e7a92d9f3282039eac5fb1b07cac2b8664cbf0ad
- linuxkit/ca-certificates:5aaa343474e5ac3ac01f8b917e82efb1063d80ff
- linuxkit/init:b5506cc74a6812dc40982cacfd2f4328f8a4b12a
- linuxkit/runc:9442aa234715e751a16144f1d4ae3fd1a00fd492
- linuxkit/containerd:ba19f64efd3331a8fd0a33e00eabd14f6ee1780e
- linuxkit/ca-certificates:256f1950df59f2f209e9f0b81374177409eb11de
onboot:
- name: sysctl
image: linuxkit/sysctl:5a374e4bf3e5a7deeacff6571d0f30f7ea8f56db
image: linuxkit/sysctl:43ac1d39da329c3567fcb9689e5ca99de6d169b6
services:
- name: getty
image: linuxkit/getty:5d86a2ce2d890c14ab66b13638dcadf74f29218b
image: linuxkit/getty:a86d74c8f89be8956330c3b115b0b1f2e09ef6e0
env:
- INSECURE=true
- name: rngd
image: linuxkit/rngd:cdb919e4aee49fed0bf6075f0a104037cba83c39
image: linuxkit/rngd:984eb580ecb63986f07f626b61692a97aacd7198
- name: dhcpcd
image: linuxkit/dhcpcd:e9e3580f2de00e73e7b316a007186d22fea056ee
image: linuxkit/dhcpcd:b87e9ececac55a65eaa592f4dd8b4e0c3009afdb
- name: open-vm-tools
image: linuxkit/open-vm-tools:728ddf726474178eea97604c0baeabd52edab7e9
image: linuxkit/open-vm-tools:ce668b7064e26dbb4767a9106aae8cb888a3a61c
- name: nginx
image: nginx:1.13.8-alpine
capabilities:

View File

@@ -1,26 +1,26 @@
kernel:
image: linuxkit/kernel:6.6.13
image: linuxkit/kernel:6.12.59
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0 console=ttysclp0 root=/dev/vda"
init:
- linuxkit/init:45a1ad5919f0b6acf0f0cf730e9434abfae11fe6
- linuxkit/runc:6062483d748609d505f2bcde4e52ee64a3329f5f
- linuxkit/containerd:e7a92d9f3282039eac5fb1b07cac2b8664cbf0ad
- linuxkit/ca-certificates:5aaa343474e5ac3ac01f8b917e82efb1063d80ff
- linuxkit/init:b5506cc74a6812dc40982cacfd2f4328f8a4b12a
- linuxkit/runc:9442aa234715e751a16144f1d4ae3fd1a00fd492
- linuxkit/containerd:ba19f64efd3331a8fd0a33e00eabd14f6ee1780e
- linuxkit/ca-certificates:256f1950df59f2f209e9f0b81374177409eb11de
onboot:
- name: sysctl
image: linuxkit/sysctl:5a374e4bf3e5a7deeacff6571d0f30f7ea8f56db
image: linuxkit/sysctl:43ac1d39da329c3567fcb9689e5ca99de6d169b6
- name: rngd1
image: linuxkit/rngd:cdb919e4aee49fed0bf6075f0a104037cba83c39
image: linuxkit/rngd:984eb580ecb63986f07f626b61692a97aacd7198
command: ["/sbin/rngd", "-1"]
- name: dhcpcd
image: linuxkit/dhcpcd:e9e3580f2de00e73e7b316a007186d22fea056ee
image: linuxkit/dhcpcd:b87e9ececac55a65eaa592f4dd8b4e0c3009afdb
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: metadata
image: linuxkit/metadata:b082f1bf97a9034d1e4c0e36a5d2923f4e58f540
image: linuxkit/metadata:4bbf406678d376e1ae9c9efae6ca2421f63fb4ff
services:
- name: getty
image: linuxkit/getty:5d86a2ce2d890c14ab66b13638dcadf74f29218b
image: linuxkit/getty:a86d74c8f89be8956330c3b115b0b1f2e09ef6e0
env:
- INSECURE=true
- name: rngd
image: linuxkit/rngd:cdb919e4aee49fed0bf6075f0a104037cba83c39
image: linuxkit/rngd:984eb580ecb63986f07f626b61692a97aacd7198

View File

@@ -1,23 +1,23 @@
kernel:
image: linuxkit/kernel:6.6.13
image: linuxkit/kernel:6.12.59
cmdline: "console=tty0"
init:
- linuxkit/init:45a1ad5919f0b6acf0f0cf730e9434abfae11fe6
- linuxkit/runc:6062483d748609d505f2bcde4e52ee64a3329f5f
- linuxkit/containerd:e7a92d9f3282039eac5fb1b07cac2b8664cbf0ad
- linuxkit/ca-certificates:5aaa343474e5ac3ac01f8b917e82efb1063d80ff
- linuxkit/init:b5506cc74a6812dc40982cacfd2f4328f8a4b12a
- linuxkit/runc:9442aa234715e751a16144f1d4ae3fd1a00fd492
- linuxkit/containerd:ba19f64efd3331a8fd0a33e00eabd14f6ee1780e
- linuxkit/ca-certificates:256f1950df59f2f209e9f0b81374177409eb11de
onboot:
- name: sysctl
image: linuxkit/sysctl:5a374e4bf3e5a7deeacff6571d0f30f7ea8f56db
image: linuxkit/sysctl:43ac1d39da329c3567fcb9689e5ca99de6d169b6
services:
- name: getty
image: linuxkit/getty:5d86a2ce2d890c14ab66b13638dcadf74f29218b
image: linuxkit/getty:a86d74c8f89be8956330c3b115b0b1f2e09ef6e0
env:
- INSECURE=true
- name: rngd
image: linuxkit/rngd:cdb919e4aee49fed0bf6075f0a104037cba83c39
image: linuxkit/rngd:984eb580ecb63986f07f626b61692a97aacd7198
- name: dhcpcd
image: linuxkit/dhcpcd:e9e3580f2de00e73e7b316a007186d22fea056ee
image: linuxkit/dhcpcd:b87e9ececac55a65eaa592f4dd8b4e0c3009afdb
- name: nginx
image: nginx:1.13.8-alpine
capabilities:

View File

@@ -1,29 +1,29 @@
kernel:
image: linuxkit/kernel:6.6.13
image: linuxkit/kernel:6.12.59
cmdline: "console=ttyS0"
init:
- linuxkit/init:45a1ad5919f0b6acf0f0cf730e9434abfae11fe6
- linuxkit/runc:6062483d748609d505f2bcde4e52ee64a3329f5f
- linuxkit/containerd:e7a92d9f3282039eac5fb1b07cac2b8664cbf0ad
- linuxkit/ca-certificates:5aaa343474e5ac3ac01f8b917e82efb1063d80ff
- linuxkit/init:b5506cc74a6812dc40982cacfd2f4328f8a4b12a
- linuxkit/runc:9442aa234715e751a16144f1d4ae3fd1a00fd492
- linuxkit/containerd:ba19f64efd3331a8fd0a33e00eabd14f6ee1780e
- linuxkit/ca-certificates:256f1950df59f2f209e9f0b81374177409eb11de
onboot:
- name: sysctl
image: linuxkit/sysctl:5a374e4bf3e5a7deeacff6571d0f30f7ea8f56db
image: linuxkit/sysctl:43ac1d39da329c3567fcb9689e5ca99de6d169b6
- name: dhcpcd
image: linuxkit/dhcpcd:e9e3580f2de00e73e7b316a007186d22fea056ee
image: linuxkit/dhcpcd:b87e9ececac55a65eaa592f4dd8b4e0c3009afdb
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: metadata
image: linuxkit/metadata:b082f1bf97a9034d1e4c0e36a5d2923f4e58f540
image: linuxkit/metadata:4bbf406678d376e1ae9c9efae6ca2421f63fb4ff
command: ["/usr/bin/metadata", "vultr"]
services:
- name: getty
image: linuxkit/getty:5d86a2ce2d890c14ab66b13638dcadf74f29218b
image: linuxkit/getty:a86d74c8f89be8956330c3b115b0b1f2e09ef6e0
env:
- INSECURE=true
- name: rngd
image: linuxkit/rngd:cdb919e4aee49fed0bf6075f0a104037cba83c39
image: linuxkit/rngd:984eb580ecb63986f07f626b61692a97aacd7198
- name: sshd
image: linuxkit/sshd:75f399fbfb6455dfccd4cb30543d0b4b494d28c8
image: linuxkit/sshd:08e5d4a46603eff485d5d1b14001cc932a530858
binds.add:
- /run/config/ssh/authorized_keys:/root/.ssh/authorized_keys
- name: nginx

View File

@@ -1,19 +1,19 @@
# Minimal YAML to run a redis server (used at DockerCon'17)
# connect: nc localhost 6379
kernel:
image: linuxkit/kernel:6.6.13
image: linuxkit/kernel:6.12.59
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0 console=ttysclp0"
init:
- linuxkit/init:45a1ad5919f0b6acf0f0cf730e9434abfae11fe6
- linuxkit/runc:6062483d748609d505f2bcde4e52ee64a3329f5f
- linuxkit/containerd:e7a92d9f3282039eac5fb1b07cac2b8664cbf0ad
- linuxkit/init:b5506cc74a6812dc40982cacfd2f4328f8a4b12a
- linuxkit/runc:9442aa234715e751a16144f1d4ae3fd1a00fd492
- linuxkit/containerd:ba19f64efd3331a8fd0a33e00eabd14f6ee1780e
onboot:
- name: dhcpcd
image: linuxkit/dhcpcd:e9e3580f2de00e73e7b316a007186d22fea056ee
image: linuxkit/dhcpcd:b87e9ececac55a65eaa592f4dd8b4e0c3009afdb
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
services:
- name: getty
image: linuxkit/getty:5d86a2ce2d890c14ab66b13638dcadf74f29218b
image: linuxkit/getty:a86d74c8f89be8956330c3b115b0b1f2e09ef6e0
env:
- INSECURE=true
# Currently redis:4.0.6-alpine has trust issue with multi-arch

View File

@@ -1,28 +1,28 @@
kernel:
image: linuxkit/kernel:6.6.13
image: linuxkit/kernel:6.12.59
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0 console=ttysclp0"
init:
- linuxkit/init:45a1ad5919f0b6acf0f0cf730e9434abfae11fe6
- linuxkit/runc:6062483d748609d505f2bcde4e52ee64a3329f5f
- linuxkit/containerd:e7a92d9f3282039eac5fb1b07cac2b8664cbf0ad
- linuxkit/ca-certificates:5aaa343474e5ac3ac01f8b917e82efb1063d80ff
- linuxkit/init:b5506cc74a6812dc40982cacfd2f4328f8a4b12a
- linuxkit/runc:9442aa234715e751a16144f1d4ae3fd1a00fd492
- linuxkit/containerd:ba19f64efd3331a8fd0a33e00eabd14f6ee1780e
- linuxkit/ca-certificates:256f1950df59f2f209e9f0b81374177409eb11de
onboot:
- name: sysctl
image: linuxkit/sysctl:5a374e4bf3e5a7deeacff6571d0f30f7ea8f56db
image: linuxkit/sysctl:43ac1d39da329c3567fcb9689e5ca99de6d169b6
- name: rngd1
image: linuxkit/rngd:cdb919e4aee49fed0bf6075f0a104037cba83c39
image: linuxkit/rngd:984eb580ecb63986f07f626b61692a97aacd7198
command: ["/sbin/rngd", "-1"]
services:
- name: getty
image: linuxkit/getty:5d86a2ce2d890c14ab66b13638dcadf74f29218b
image: linuxkit/getty:a86d74c8f89be8956330c3b115b0b1f2e09ef6e0
env:
- INSECURE=true
- name: rngd
image: linuxkit/rngd:cdb919e4aee49fed0bf6075f0a104037cba83c39
image: linuxkit/rngd:984eb580ecb63986f07f626b61692a97aacd7198
- name: dhcpcd
image: linuxkit/dhcpcd:e9e3580f2de00e73e7b316a007186d22fea056ee
image: linuxkit/dhcpcd:b87e9ececac55a65eaa592f4dd8b4e0c3009afdb
- name: sshd
image: linuxkit/sshd:75f399fbfb6455dfccd4cb30543d0b4b494d28c8
image: linuxkit/sshd:08e5d4a46603eff485d5d1b14001cc932a530858
binds.add:
- /root/.ssh:/root/.ssh
files:

View File

@@ -1,19 +1,19 @@
kernel:
image: linuxkit/kernel:6.6.13
image: linuxkit/kernel:6.12.59
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
init:
- linuxkit/init:45a1ad5919f0b6acf0f0cf730e9434abfae11fe6
- linuxkit/runc:6062483d748609d505f2bcde4e52ee64a3329f5f
- linuxkit/containerd:e7a92d9f3282039eac5fb1b07cac2b8664cbf0ad
- linuxkit/init:b5506cc74a6812dc40982cacfd2f4328f8a4b12a
- linuxkit/runc:9442aa234715e751a16144f1d4ae3fd1a00fd492
- linuxkit/containerd:ba19f64efd3331a8fd0a33e00eabd14f6ee1780e
onboot:
- name: ip
image: linuxkit/ip:bb250017b05de5e16ac436b1eb19a39c87b5a252
image: linuxkit/ip:3c0676ee83a0dc739685be1253b8326f08581ef7
binds:
- /etc/ip:/etc/ip
command: ["ip", "-b", "/etc/ip/eth0.conf"]
services:
- name: getty
image: linuxkit/getty:5d86a2ce2d890c14ab66b13638dcadf74f29218b
image: linuxkit/getty:a86d74c8f89be8956330c3b115b0b1f2e09ef6e0
env:
- INSECURE=true
files:

View File

@@ -1,31 +1,31 @@
kernel:
image: linuxkit/kernel:6.6.13
image: linuxkit/kernel:6.12.59
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0 console=ttysclp0"
init:
- linuxkit/init:45a1ad5919f0b6acf0f0cf730e9434abfae11fe6
- linuxkit/runc:6062483d748609d505f2bcde4e52ee64a3329f5f
- linuxkit/containerd:e7a92d9f3282039eac5fb1b07cac2b8664cbf0ad
- linuxkit/ca-certificates:5aaa343474e5ac3ac01f8b917e82efb1063d80ff
- linuxkit/init:b5506cc74a6812dc40982cacfd2f4328f8a4b12a
- linuxkit/runc:9442aa234715e751a16144f1d4ae3fd1a00fd492
- linuxkit/containerd:ba19f64efd3331a8fd0a33e00eabd14f6ee1780e
- linuxkit/ca-certificates:256f1950df59f2f209e9f0b81374177409eb11de
onboot:
- name: sysctl
image: linuxkit/sysctl:5a374e4bf3e5a7deeacff6571d0f30f7ea8f56db
image: linuxkit/sysctl:43ac1d39da329c3567fcb9689e5ca99de6d169b6
- name: dhcpcd
image: linuxkit/dhcpcd:e9e3580f2de00e73e7b316a007186d22fea056ee
image: linuxkit/dhcpcd:b87e9ececac55a65eaa592f4dd8b4e0c3009afdb
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: format
image: linuxkit/format:e040f4f045f03138a1ee8a22bb6feae7fd5596a6
image: linuxkit/format:4f779c0b0d0ba145b7f03211b5cbf59fbbe12e54
- name: mount
image: linuxkit/mount:19ff89c251a4156bda8ed11c95faad2f40eb770e
image: linuxkit/mount:bd1c3bb45e48e68e47a9456d1669f7119f855184
command: ["/usr/bin/mountie", "/var/external"]
- name: swap
image: linuxkit/swap:c57f3319ce770515357f0058035e40519c22b752
image: linuxkit/swap:7e19e5e69370e82b90a110093441abbf5e70638b
# to use unencrypted swap, use:
# command: ["/swap.sh", "--path", "/var/external/swap", "--size", "1G"]
command: ["/swap.sh", "--path", "/var/external/swap", "--size", "1G", "--encrypt"]
services:
- name: getty
image: linuxkit/getty:5d86a2ce2d890c14ab66b13638dcadf74f29218b
image: linuxkit/getty:a86d74c8f89be8956330c3b115b0b1f2e09ef6e0
env:
- INSECURE=true
- name: rngd
image: linuxkit/rngd:cdb919e4aee49fed0bf6075f0a104037cba83c39
image: linuxkit/rngd:984eb580ecb63986f07f626b61692a97aacd7198

View File

@@ -1,26 +1,26 @@
kernel:
image: linuxkit/kernel:6.6.13
image: linuxkit/kernel:6.12.59
cmdline: "console=tty0 console=ttyS0"
init:
- linuxkit/init:45a1ad5919f0b6acf0f0cf730e9434abfae11fe6
- linuxkit/runc:6062483d748609d505f2bcde4e52ee64a3329f5f
- linuxkit/containerd:e7a92d9f3282039eac5fb1b07cac2b8664cbf0ad
- linuxkit/ca-certificates:5aaa343474e5ac3ac01f8b917e82efb1063d80ff
- linuxkit/init:b5506cc74a6812dc40982cacfd2f4328f8a4b12a
- linuxkit/runc:9442aa234715e751a16144f1d4ae3fd1a00fd492
- linuxkit/containerd:ba19f64efd3331a8fd0a33e00eabd14f6ee1780e
- linuxkit/ca-certificates:256f1950df59f2f209e9f0b81374177409eb11de
onboot:
- name: sysctl
image: linuxkit/sysctl:5a374e4bf3e5a7deeacff6571d0f30f7ea8f56db
image: linuxkit/sysctl:43ac1d39da329c3567fcb9689e5ca99de6d169b6
- name: dhcpcd
image: linuxkit/dhcpcd:e9e3580f2de00e73e7b316a007186d22fea056ee
image: linuxkit/dhcpcd:b87e9ececac55a65eaa592f4dd8b4e0c3009afdb
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
services:
- name: getty
image: linuxkit/getty:5d86a2ce2d890c14ab66b13638dcadf74f29218b
image: linuxkit/getty:a86d74c8f89be8956330c3b115b0b1f2e09ef6e0
env:
- INSECURE=true
- name: tss
image: linuxkit/tss:856286012a613598d6ef6869b196f9a72245b7d2
image: linuxkit/tss:15e6d8a72e46089109985ee9a72dc457bf5c42b1
- name: rngd
image: linuxkit/rngd:cdb919e4aee49fed0bf6075f0a104037cba83c39
image: linuxkit/rngd:984eb580ecb63986f07f626b61692a97aacd7198
files:
- path: etc/getty.shadow
# sample sets password for root to "abcdefgh" (without quotes)

45
examples/volumes.yml Normal file
View File

@@ -0,0 +1,45 @@
# example with volumes, both blank and populated
kernel:
image: linuxkit/kernel:6.12.59
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
init:
- linuxkit/init:b5506cc74a6812dc40982cacfd2f4328f8a4b12a
- linuxkit/runc:9442aa234715e751a16144f1d4ae3fd1a00fd492
- linuxkit/containerd:ba19f64efd3331a8fd0a33e00eabd14f6ee1780e
- linuxkit/ca-certificates:256f1950df59f2f209e9f0b81374177409eb11de
onboot:
- name: sysctl
image: linuxkit/sysctl:43ac1d39da329c3567fcb9689e5ca99de6d169b6
- name: dhcpcd
image: linuxkit/dhcpcd:b87e9ececac55a65eaa592f4dd8b4e0c3009afdb
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
onshutdown:
- name: shutdown
image: busybox:latest
command: ["/bin/echo", "so long and thanks for all the fish"]
services:
- name: getty
image: linuxkit/getty:a86d74c8f89be8956330c3b115b0b1f2e09ef6e0
env:
- INSECURE=true
- name: rngd
image: linuxkit/rngd:984eb580ecb63986f07f626b61692a97aacd7198
- name: nginx
image: nginx:1.19.5-alpine
capabilities:
- CAP_NET_BIND_SERVICE
- CAP_CHOWN
- CAP_SETUID
- CAP_SETGID
- CAP_DAC_OVERRIDE
binds:
- /etc/resolv.conf:/etc/resolv.conf
- blank:/blank
- alpine:/alpine
volumes:
- name: blank # blank volume
- name: alpine # populated volume
image: alpine:3.21
files:
- path: etc/linuxkit-config
metadata: yaml

View File

@@ -1,13 +1,13 @@
kernel:
image: linuxkit/kernel:6.6.13
image: linuxkit/kernel:6.12.59
cmdline: "console=ttyS0"
init:
- linuxkit/init:45a1ad5919f0b6acf0f0cf730e9434abfae11fe6
- linuxkit/runc:6062483d748609d505f2bcde4e52ee64a3329f5f
- linuxkit/containerd:e7a92d9f3282039eac5fb1b07cac2b8664cbf0ad
- linuxkit/init:b5506cc74a6812dc40982cacfd2f4328f8a4b12a
- linuxkit/runc:9442aa234715e751a16144f1d4ae3fd1a00fd492
- linuxkit/containerd:ba19f64efd3331a8fd0a33e00eabd14f6ee1780e
onboot:
- name: dhcpcd
image: linuxkit/dhcpcd:e9e3580f2de00e73e7b316a007186d22fea056ee
image: linuxkit/dhcpcd:b87e9ececac55a65eaa592f4dd8b4e0c3009afdb
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: mount-vpnkit
image: alpine:3.13
@@ -19,11 +19,11 @@ onboot:
command: ["sh", "-c", "mkdir /host_var/vpnkit && mount -v -t 9p -o trans=virtio,dfltuid=1001,dfltgid=50,version=9p2000 port /host_var/vpnkit"]
services:
- name: sshd
image: linuxkit/sshd:75f399fbfb6455dfccd4cb30543d0b4b494d28c8
image: linuxkit/sshd:08e5d4a46603eff485d5d1b14001cc932a530858
binds.add:
- /root/.ssh:/root/.ssh
- name: vpnkit-forwarder
image: linuxkit/vpnkit-forwarder:a89ec807d7d675dccd53773c07382bc707db3396
image: linuxkit/vpnkit-forwarder:d0bc6500a9dc97b4556bb4bda20160a294cc61a3
binds:
- /var/vpnkit:/port
net: host

View File

@@ -1,17 +1,17 @@
kernel:
image: linuxkit/kernel:6.6.13
image: linuxkit/kernel:6.12.59
cmdline: "console=ttyS0"
init:
- linuxkit/init:45a1ad5919f0b6acf0f0cf730e9434abfae11fe6
- linuxkit/runc:6062483d748609d505f2bcde4e52ee64a3329f5f
- linuxkit/containerd:e7a92d9f3282039eac5fb1b07cac2b8664cbf0ad
- linuxkit/init:b5506cc74a6812dc40982cacfd2f4328f8a4b12a
- linuxkit/runc:9442aa234715e751a16144f1d4ae3fd1a00fd492
- linuxkit/containerd:ba19f64efd3331a8fd0a33e00eabd14f6ee1780e
onboot:
- name: dhcpcd
image: linuxkit/dhcpcd:e9e3580f2de00e73e7b316a007186d22fea056ee
image: linuxkit/dhcpcd:b87e9ececac55a65eaa592f4dd8b4e0c3009afdb
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
services:
- name: vsudd
image: linuxkit/vsudd:b4d80d243733f80906cdbcf77f367a7b5744dc09
image: linuxkit/vsudd:b227ed955d14720fcb99f0e1fbd69fbc1dea3106
binds:
- /run/containerd/containerd.sock:/run/containerd/containerd.sock
command: ["/vsudd",

View File

@@ -1,19 +1,19 @@
kernel:
image: linuxkit/kernel:6.6.13
image: linuxkit/kernel:6.12.59
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
init:
- linuxkit/init:45a1ad5919f0b6acf0f0cf730e9434abfae11fe6
- linuxkit/runc:6062483d748609d505f2bcde4e52ee64a3329f5f
- linuxkit/containerd:e7a92d9f3282039eac5fb1b07cac2b8664cbf0ad
- linuxkit/ca-certificates:5aaa343474e5ac3ac01f8b917e82efb1063d80ff
- linuxkit/init:b5506cc74a6812dc40982cacfd2f4328f8a4b12a
- linuxkit/runc:9442aa234715e751a16144f1d4ae3fd1a00fd492
- linuxkit/containerd:ba19f64efd3331a8fd0a33e00eabd14f6ee1780e
- linuxkit/ca-certificates:256f1950df59f2f209e9f0b81374177409eb11de
onboot:
- name: sysctl
image: linuxkit/sysctl:5a374e4bf3e5a7deeacff6571d0f30f7ea8f56db
image: linuxkit/sysctl:43ac1d39da329c3567fcb9689e5ca99de6d169b6
- name: dhcpcd
image: linuxkit/dhcpcd:e9e3580f2de00e73e7b316a007186d22fea056ee
image: linuxkit/dhcpcd:b87e9ececac55a65eaa592f4dd8b4e0c3009afdb
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: wg0
image: linuxkit/ip:bb250017b05de5e16ac436b1eb19a39c87b5a252
image: linuxkit/ip:3c0676ee83a0dc739685be1253b8326f08581ef7
net: new
binds:
- /etc/wireguard:/etc/wireguard
@@ -26,7 +26,7 @@ onboot:
bindNS:
net: /run/netns/wg0
- name: wg1
image: linuxkit/ip:bb250017b05de5e16ac436b1eb19a39c87b5a252
image: linuxkit/ip:3c0676ee83a0dc739685be1253b8326f08581ef7
net: new
binds:
- /etc/wireguard:/etc/wireguard
@@ -40,12 +40,12 @@ onboot:
net: /run/netns/wg1
services:
- name: getty
image: linuxkit/getty:5d86a2ce2d890c14ab66b13638dcadf74f29218b
image: linuxkit/getty:a86d74c8f89be8956330c3b115b0b1f2e09ef6e0
env:
- INSECURE=true
net: /run/netns/wg1
- name: rngd
image: linuxkit/rngd:cdb919e4aee49fed0bf6075f0a104037cba83c39
image: linuxkit/rngd:984eb580ecb63986f07f626b61692a97aacd7198
- name: nginx
image: nginx:1.13.8-alpine
net: /run/netns/wg0

3
kernel/6.12.x/build-args Normal file
View File

@@ -0,0 +1,3 @@
KERNEL_VERSION=6.12.59
KERNEL_SERIES=6.12.x
BUILD_IMAGE=linuxkit/alpine:35b33c6b03c40e51046c3b053dd131a68a26c37a

5788
kernel/6.12.x/config-aarch64 Normal file

File diff suppressed because it is too large Load Diff

5195
kernel/6.12.x/config-riscv64 Normal file

File diff suppressed because it is too large Load Diff

5381
kernel/6.12.x/config-x86_64 Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +1,3 @@
KERNEL_VERSION=6.6.13
KERNEL_VERSION=6.6.71
KERNEL_SERIES=6.6.x
BUILD_IMAGE=linuxkit/alpine:146f540f25cd92ec8ff0c5b0c98342a9a95e479e
BUILD_IMAGE=linuxkit/alpine:35b33c6b03c40e51046c3b053dd131a68a26c37a

View File

@@ -1,20 +1,21 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 6.6.13 Kernel Configuration
# Linux/arm64 6.6.71 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (Alpine 13.2.1_git20231014) 13.2.1 20231014"
CONFIG_CC_VERSION_TEXT="gcc (Alpine 14.2.0) 14.2.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=130201
CONFIG_GCC_VERSION=140200
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=24100
CONFIG_AS_VERSION=24301
CONFIG_LD_IS_BFD=y
CONFIG_LD_VERSION=24100
CONFIG_LD_VERSION=24301
CONFIG_LLD_VERSION=0
CONFIG_CC_CAN_LINK=y
CONFIG_CC_CAN_LINK_STATIC=y
CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y
CONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y
CONFIG_TOOLS_SUPPORT_RELR=y
CONFIG_CC_HAS_ASM_INLINE=y
CONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y
CONFIG_PAHOLE_VERSION=0
@@ -157,7 +158,7 @@ CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y
CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH=y
CONFIG_CC_HAS_INT128=y
CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
CONFIG_GCC11_NO_ARRAY_BOUNDS=y
CONFIG_GCC10_NO_ARRAY_BOUNDS=y
CONFIG_CC_NO_ARRAY_BOUNDS=y
CONFIG_ARCH_SUPPORTS_INT128=y
CONFIG_CGROUPS=y
@@ -371,7 +372,10 @@ CONFIG_ARM64_ERRATUM_2067961=y
CONFIG_ARM64_ERRATUM_2441009=y
CONFIG_ARM64_ERRATUM_2457168=y
CONFIG_ARM64_ERRATUM_2645198=y
CONFIG_ARM64_WORKAROUND_SPECULATIVE_UNPRIV_LOAD=y
CONFIG_ARM64_ERRATUM_2966298=y
CONFIG_ARM64_ERRATUM_3117295=y
CONFIG_ARM64_ERRATUM_3194386=y
CONFIG_CAVIUM_ERRATUM_22375=y
CONFIG_CAVIUM_ERRATUM_23154=y
CONFIG_CAVIUM_ERRATUM_27456=y
@@ -488,7 +492,6 @@ CONFIG_ARM64_EPAN=y
# end of ARMv8.7 architectural features
CONFIG_ARM64_SVE=y
CONFIG_ARM64_SME=y
# CONFIG_ARM64_PSEUDO_NMI is not set
CONFIG_RELOCATABLE=y
CONFIG_RANDOMIZE_BASE=y
@@ -631,6 +634,7 @@ CONFIG_KVM_GENERIC_HARDWARE_ENABLING=y
CONFIG_VIRTUALIZATION=y
CONFIG_KVM=y
# CONFIG_NVHE_EL2_DEBUG is not set
CONFIG_CPU_MITIGATIONS=y
#
# General architecture-dependent options
@@ -730,6 +734,7 @@ CONFIG_HAVE_ARCH_PREL32_RELOCATIONS=y
CONFIG_ARCH_USE_MEMREMAP_PROT=y
# CONFIG_LOCK_EVENT_COUNTS is not set
CONFIG_ARCH_HAS_RELR=y
CONFIG_RELR=y
CONFIG_HAVE_PREEMPT_DYNAMIC=y
CONFIG_HAVE_PREEMPT_DYNAMIC_KEY=y
CONFIG_ARCH_WANT_LD_ORPHAN_WARN=y
@@ -905,6 +910,7 @@ CONFIG_PAGE_REPORTING=y
CONFIG_MIGRATION=y
CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION=y
CONFIG_ARCH_ENABLE_THP_MIGRATION=y
CONFIG_PCP_BATCH_SCALE_MAX=5
CONFIG_PHYS_ADDR_T_64BIT=y
CONFIG_MMU_NOTIFIER=y
CONFIG_KSM=y
@@ -3354,7 +3360,6 @@ CONFIG_MFD_CORE=y
# CONFIG_MFD_SKY81452 is not set
# CONFIG_MFD_STMPE is not set
CONFIG_MFD_SYSCON=y
# CONFIG_MFD_TI_AM335X_TSCADC is not set
# CONFIG_MFD_LP3943 is not set
# CONFIG_MFD_LP8788 is not set
# CONFIG_MFD_TI_LMU is not set
@@ -3413,6 +3418,7 @@ CONFIG_MFD_VEXPRESS_SYSREG=y
# Graphics support
#
CONFIG_APERTURE_HELPERS=y
CONFIG_SCREEN_INFO=y
CONFIG_VIDEO_CMDLINE=y
# CONFIG_AUXDISPLAY is not set
# CONFIG_DRM is not set
@@ -3474,6 +3480,7 @@ CONFIG_FB_SYS_IMAGEBLIT=y
# CONFIG_FB_FOREIGN_ENDIAN is not set
CONFIG_FB_SYS_FOPS=y
CONFIG_FB_DEFERRED_IO=y
CONFIG_FB_IOMEM_FOPS=y
CONFIG_FB_IOMEM_HELPERS=y
CONFIG_FB_SYSMEM_HELPERS=y
CONFIG_FB_SYSMEM_HELPERS_DEFERRED=y
@@ -3600,6 +3607,7 @@ CONFIG_HID_GENERIC=y
# CONFIG_HID_ZYDACRON is not set
# CONFIG_HID_SENSOR_HUB is not set
# CONFIG_HID_ALPS is not set
# CONFIG_HID_MCP2200 is not set
# CONFIG_HID_MCP2221 is not set
# end of Special HID drivers
@@ -3821,8 +3829,6 @@ CONFIG_MMC_SDHCI_PLTFM=m
# CONFIG_MMC_TOSHIBA_PCI is not set
# CONFIG_MMC_MTK is not set
# CONFIG_MMC_SDHCI_XENON is not set
# CONFIG_MMC_SDHCI_OMAP is not set
# CONFIG_MMC_SDHCI_AM654 is not set
# CONFIG_SCSI_UFSHCD is not set
# CONFIG_MEMSTICK is not set
# CONFIG_NEW_LEDS is not set
@@ -4726,6 +4732,9 @@ CONFIG_ENCRYPTED_KEYS=y
# CONFIG_USER_DECRYPTED_DATA is not set
CONFIG_KEY_DH_OPERATIONS=y
CONFIG_SECURITY_DMESG_RESTRICT=y
CONFIG_PROC_MEM_ALWAYS_FORCE=y
# CONFIG_PROC_MEM_FORCE_PTRACE is not set
# CONFIG_PROC_MEM_NO_FORCE is not set
CONFIG_SECURITY=y
CONFIG_SECURITYFS=y
CONFIG_SECURITY_NETWORK=y
@@ -4821,6 +4830,7 @@ CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_ALGAPI2=y
CONFIG_CRYPTO_AEAD=y
CONFIG_CRYPTO_AEAD2=y
CONFIG_CRYPTO_SIG=y
CONFIG_CRYPTO_SIG2=y
CONFIG_CRYPTO_SKCIPHER=y
CONFIG_CRYPTO_SKCIPHER2=y
@@ -5191,7 +5201,6 @@ CONFIG_DMA_DIRECT_REMAP=y
# CONFIG_DMA_MAP_BENCHMARK is not set
CONFIG_SGL_ALLOC=y
CONFIG_CHECK_SIGNATURE=y
# CONFIG_FORCE_NR_CPUS is not set
CONFIG_CPU_RMAP=y
CONFIG_DQL=y
CONFIG_GLOB=y

4968
kernel/6.6.x/config-riscv64 Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,15 +1,15 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 6.6.13 Kernel Configuration
# Linux/x86 6.6.71 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (Alpine 13.2.1_git20231014) 13.2.1 20231014"
CONFIG_CC_VERSION_TEXT="gcc (Alpine 14.2.0) 14.2.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=130201
CONFIG_GCC_VERSION=140200
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=24100
CONFIG_AS_VERSION=24301
CONFIG_LD_IS_BFD=y
CONFIG_LD_VERSION=24100
CONFIG_LD_VERSION=24301
CONFIG_LLD_VERSION=0
CONFIG_CC_CAN_LINK=y
CONFIG_CC_CAN_LINK_STATIC=y
@@ -180,7 +180,7 @@ CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y
CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH=y
CONFIG_CC_HAS_INT128=y
CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
CONFIG_GCC11_NO_ARRAY_BOUNDS=y
CONFIG_GCC10_NO_ARRAY_BOUNDS=y
CONFIG_CC_NO_ARRAY_BOUNDS=y
CONFIG_ARCH_SUPPORTS_INT128=y
CONFIG_CGROUPS=y
@@ -470,7 +470,6 @@ CONFIG_PHYSICAL_ALIGN=0x1000000
CONFIG_DYNAMIC_MEMORY_LAYOUT=y
CONFIG_RANDOMIZE_MEMORY=y
CONFIG_RANDOMIZE_MEMORY_PHYSICAL_PADDING=0xa
# CONFIG_ADDRESS_MASKING is not set
CONFIG_HOTPLUG_CPU=y
# CONFIG_COMPAT_VDSO is not set
# CONFIG_LEGACY_VSYSCALL_XONLY is not set
@@ -490,7 +489,7 @@ CONFIG_CALL_PADDING=y
CONFIG_HAVE_CALL_THUNKS=y
CONFIG_CALL_THUNKS=y
CONFIG_PREFIX_SYMBOLS=y
CONFIG_SPECULATION_MITIGATIONS=y
CONFIG_CPU_MITIGATIONS=y
CONFIG_PAGE_TABLE_ISOLATION=y
CONFIG_RETPOLINE=y
CONFIG_RETHUNK=y
@@ -502,6 +501,8 @@ CONFIG_CPU_IBRS_ENTRY=y
CONFIG_CPU_SRSO=y
# CONFIG_SLS is not set
# CONFIG_GDS_FORCE_MITIGATION is not set
CONFIG_MITIGATION_RFDS=y
CONFIG_MITIGATION_SPECTRE_BHI=y
CONFIG_ARCH_HAS_ADD_PAGES=y
#
@@ -684,6 +685,7 @@ CONFIG_AS_SHA256_NI=y
CONFIG_AS_TPAUSE=y
CONFIG_AS_GFNI=y
CONFIG_AS_WRUSS=y
CONFIG_ARCH_CONFIGURES_CPU_MITIGATIONS=y
#
# General architecture-dependent options
@@ -1004,6 +1006,7 @@ CONFIG_DEVICE_MIGRATION=y
CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION=y
CONFIG_ARCH_ENABLE_THP_MIGRATION=y
CONFIG_CONTIG_ALLOC=y
CONFIG_PCP_BATCH_SCALE_MAX=5
CONFIG_PHYS_ADDR_T_64BIT=y
CONFIG_MMU_NOTIFIER=y
CONFIG_KSM=y
@@ -3177,7 +3180,6 @@ CONFIG_LPC_SCH=y
CONFIG_MFD_SM501=y
# CONFIG_MFD_SKY81452 is not set
# CONFIG_MFD_SYSCON is not set
# CONFIG_MFD_TI_AM335X_TSCADC is not set
# CONFIG_MFD_LP3943 is not set
# CONFIG_MFD_LP8788 is not set
# CONFIG_MFD_TI_LMU is not set
@@ -3219,6 +3221,7 @@ CONFIG_MFD_VX855=y
# Graphics support
#
CONFIG_APERTURE_HELPERS=y
CONFIG_SCREEN_INFO=y
CONFIG_VIDEO_CMDLINE=y
CONFIG_VIDEO_NOMODESET=y
# CONFIG_AUXDISPLAY is not set
@@ -3290,6 +3293,7 @@ CONFIG_FB_SYS_IMAGEBLIT=y
# CONFIG_FB_FOREIGN_ENDIAN is not set
CONFIG_FB_SYS_FOPS=y
CONFIG_FB_DEFERRED_IO=y
CONFIG_FB_IOMEM_FOPS=y
CONFIG_FB_IOMEM_HELPERS=y
CONFIG_FB_SYSMEM_HELPERS=y
CONFIG_FB_SYSMEM_HELPERS_DEFERRED=y
@@ -4352,6 +4356,9 @@ CONFIG_ENCRYPTED_KEYS=y
# CONFIG_USER_DECRYPTED_DATA is not set
CONFIG_KEY_DH_OPERATIONS=y
CONFIG_SECURITY_DMESG_RESTRICT=y
CONFIG_PROC_MEM_ALWAYS_FORCE=y
# CONFIG_PROC_MEM_FORCE_PTRACE is not set
# CONFIG_PROC_MEM_NO_FORCE is not set
CONFIG_SECURITY=y
CONFIG_SECURITYFS=y
CONFIG_SECURITY_NETWORK=y
@@ -4447,6 +4454,7 @@ CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_ALGAPI2=y
CONFIG_CRYPTO_AEAD=y
CONFIG_CRYPTO_AEAD2=y
CONFIG_CRYPTO_SIG=y
CONFIG_CRYPTO_SIG2=y
CONFIG_CRYPTO_SKCIPHER=y
CONFIG_CRYPTO_SKCIPHER2=y
@@ -4798,7 +4806,6 @@ CONFIG_SWIOTLB=y
# CONFIG_DMA_MAP_BENCHMARK is not set
CONFIG_SGL_ALLOC=y
CONFIG_CHECK_SIGNATURE=y
# CONFIG_FORCE_NR_CPUS is not set
CONFIG_CPU_RMAP=y
CONFIG_DQL=y
CONFIG_GLOB=y
@@ -4957,6 +4964,7 @@ CONFIG_ARCH_SUPPORTS_KMAP_LOCAL_FORCE_MAP=y
CONFIG_HAVE_ARCH_KASAN=y
CONFIG_HAVE_ARCH_KASAN_VMALLOC=y
CONFIG_CC_HAS_KASAN_GENERIC=y
CONFIG_CC_HAS_KASAN_SW_TAGS=y
CONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=y
# CONFIG_KASAN is not set
CONFIG_HAVE_ARCH_KFENCE=y

View File

@@ -1,187 +0,0 @@
ARG BUILD_IMAGE
FROM ${BUILD_IMAGE} AS kernel-build
ARG BUILD_IMAGE
RUN apk add \
argp-standalone \
automake \
bash \
bc \
binutils-dev \
bison \
build-base \
curl \
diffutils \
findutils \
flex \
git \
gmp-dev \
gnupg \
installkernel \
kmod \
elfutils-dev \
libunwind-dev \
linux-headers \
mpc1-dev \
mpfr-dev \
ncurses-dev \
openssl \
openssl-dev \
patch \
rsync \
sed \
squashfs-tools \
tar \
xz \
xz-dev \
zlib-dev
ARG KERNEL_VERSION
ARG KERNEL_SERIES
ARG EXTRA
ARG DEBUG
# We copy the entire directory. This copies some unneeded files, but
# allows us to check for the existence /${KERNEL_SERIES}/patches to
# build kernels without patches.
COPY / /src/
RUN mkdir -p /out/src
# Download and verify kernel
# PGP keys: 589DA6B1 (greg@kroah.com) & 6092693E (autosigner@kernel.org) & 00411886 (torvalds@linux-foundation.org)
RUN KERNEL_MAJOR=$(echo ${KERNEL_VERSION} | cut -d . -f 1) && \
KERNEL_MAJOR=v${KERNEL_MAJOR}.x && \
KERNEL_SOURCE=https://www.kernel.org/pub/linux/kernel/${KERNEL_MAJOR}/linux-${KERNEL_VERSION}.tar.xz && \
KERNEL_SHA256_SUMS=https://www.kernel.org/pub/linux/kernel/${KERNEL_MAJOR}/sha256sums.asc && \
KERNEL_PGP2_SIGN=https://www.kernel.org/pub/linux/kernel/${KERNEL_MAJOR}/linux-${KERNEL_VERSION}.tar.sign && \
curl -fsSLO ${KERNEL_SHA256_SUMS} && \
gpg2 -q --import /src/keys.asc && \
gpg2 --verify sha256sums.asc && \
KERNEL_SHA256=$(grep linux-${KERNEL_VERSION}.tar.xz sha256sums.asc | cut -d ' ' -f 1) && \
[ -f linux-${KERNEL_VERSION}.tar.xz ] || curl -fsSLO ${KERNEL_SOURCE} && \
echo "${KERNEL_SHA256} linux-${KERNEL_VERSION}.tar.xz" | sha256sum -c - && \
xz -d linux-${KERNEL_VERSION}.tar.xz && \
curl -fsSLO ${KERNEL_PGP2_SIGN} && \
gpg2 --verify linux-${KERNEL_VERSION}.tar.sign linux-${KERNEL_VERSION}.tar && \
cat linux-${KERNEL_VERSION}.tar | tar --absolute-names -x && mv /linux-${KERNEL_VERSION} /linux && \
printf "KERNEL_SOURCE=${KERNEL_SOURCE}\n" > /out/kernel-source-info
WORKDIR /tmp
# Download Intel ucode, create a CPIO archive for it, and keep it in the build context
# so the firmware can also be referenced with CONFIG_EXTRA_FIRMWARE
ENV UCODE_REPO=https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files
ENV UCODE_COMMIT=microcode-20210608
RUN set -e && \
if [ $(uname -m) == x86_64 ]; then \
git clone ${UCODE_REPO} ucode && \
cd ucode && \
git checkout ${UCODE_COMMIT} && \
iucode_tool --normal-earlyfw --write-earlyfw=/out/intel-ucode.cpio ./intel-ucode && \
cp license /out/intel-ucode-license.txt && \
mkdir -p /lib/firmware && \
cp -rav ./intel-ucode /lib/firmware; \
fi
WORKDIR /linux
# Apply local specific patches if present
RUN set -e && \
if [ -n "${EXTRA}" ] && [ -d /src/${KERNEL_SERIES}${EXTRA}/patches ]; then \
echo "Patching ${EXTRA} kernel"; \
for patch in /src/${KERNEL_SERIES}${EXTRA}/patches/*.patch; do \
echo "Applying $patch"; \
patch -t -F0 -N -u -p1 < "$patch"; \
done; \
fi
# Apply local common patches if present
RUN set -e && \
if [ -d /src/${KERNEL_SERIES}/patches ]; then \
for patch in /src/${KERNEL_SERIES}/patches/*.patch; do \
echo "Applying $patch"; \
patch -t -F0 -N -u -p1 < "$patch"; \
done; \
fi
# Save kernel source
RUN XZ_DEFAULTS="-T0" tar cJf /out/src/linux.tar.xz /linux
# Kernel config
RUN case $(uname -m) in \
x86_64) \
KERNEL_DEF_CONF=/linux/arch/x86/configs/x86_64_defconfig; \
;; \
aarch64) \
KERNEL_DEF_CONF=/linux/arch/arm64/configs/defconfig; \
;; \
esac && \
cp /src/${KERNEL_SERIES}/config-$(uname -m) ${KERNEL_DEF_CONF}; \
if [ -n "${EXTRA}" ] && [ -f "/src/${KERNEL_SERIES}-${EXTRA}/config-$(uname -m)" ]; then \
cat /src/${KERNEL_SERIES}-${EXTRA}/config-$(uname -m) >> ${KERNEL_DEF_CONF}; \
fi; \
sed -i "s/CONFIG_LOCALVERSION=\"-linuxkit\"/CONFIG_LOCALVERSION=\"-linuxkit${EXTRA}${DEBUG}\"/" ${KERNEL_DEF_CONF}; \
if [ -n "${DEBUG}" ]; then \
sed -i 's/CONFIG_PANIC_ON_OOPS=y/# CONFIG_PANIC_ON_OOPS is not set/' ${KERNEL_DEF_CONF}; \
cat /src/config${DEBUG} >> ${KERNEL_DEF_CONF}; \
fi && \
make defconfig && \
make oldconfig && \
if [ -z "${EXTRA}" ] && [ -z "${DEBUG}" ]; then diff -u .config ${KERNEL_DEF_CONF}; fi
# Kernel
RUN make -j "$(getconf _NPROCESSORS_ONLN)" KCFLAGS="-fno-pie" && \
case $(uname -m) in \
x86_64) \
cp arch/x86_64/boot/bzImage /out/kernel; \
;; \
aarch64) \
cp arch/arm64/boot/Image.gz /out/kernel; \
;; \
esac && \
cp System.map /out && \
([ -n "${DEBUG}" ] && cp vmlinux /out || true)
# Modules and Device Tree binaries
RUN make INSTALL_MOD_PATH=/tmp/kernel-modules modules_install && \
( DVER=$(basename $(find /tmp/kernel-modules/lib/modules/ -mindepth 1 -maxdepth 1)) && \
cd /tmp/kernel-modules/lib/modules/$DVER && \
rm -f build source && \
ln -s /usr/src/linux-headers-$DVER build ) && \
case $(uname -m) in \
aarch64) \
make INSTALL_DTBS_PATH=/tmp/kernel-modules/boot/dtb dtbs_install; \
;; \
esac && \
( cd /tmp/kernel-modules && tar cf /out/kernel.tar . )
# Headers (userspace API)
RUN mkdir -p /tmp/kernel-headers/usr && \
make INSTALL_HDR_PATH=/tmp/kernel-headers/usr headers_install && \
( cd /tmp/kernel-headers && tar cf /out/kernel-headers.tar usr )
# Headers (kernel development)
RUN DVER=$(basename $(find /tmp/kernel-modules/lib/modules/ -mindepth 1 -maxdepth 1)) && \
dir=/tmp/usr/src/linux-headers-$DVER && \
mkdir -p $dir && \
cp /linux/.config $dir && \
cp /linux/Module.symvers $dir && \
find . -path './include/*' -prune -o \
-path './arch/*/include' -prune -o \
-path './scripts/*' -prune -o \
-type f \( -name 'Makefile*' -o -name 'Kconfig*' -o -name 'Kbuild*' -o \
-name '*.lds' -o -name '*.pl' -o -name '*.sh' -o \
-name 'objtool' -o -name 'fixdep' -o -name 'randomize_layout_seed.h' \) | \
tar cf - -T - | (cd $dir; tar xf -) && \
( cd /tmp && tar cf /out/kernel-dev.tar usr/src )
RUN printf "${BUILD_IMAGE}" > /out/kernel-builder
FROM scratch
ARG BUILD_IMAGE
ENTRYPOINT []
CMD []
WORKDIR /
LABEL org.mobyproject.linuxkit.kernel.buildimage=${BUILD_IMAGE}
COPY --from=kernel-build /out/* /

View File

@@ -1,100 +0,0 @@
ARG BUILD_IMAGE
FROM ${KERNEL_VERSION}-${HASH} as ksrc
FROM ${BUILD_IMAGE} AS build
RUN apk update && apk upgrade -a && \
apk add --no-cache \
argp-standalone \
autoconf \
automake \
bison \
build-base \
clang \
clang-dev \
clang-static \
cmake \
curl \
elfutils-dev \
flex-dev \
gettext-dev \
git \
iperf3 \
libedit-dev \
libtool \
llvm \
llvm-dev \
llvm-static \
llvm17-gtest \
luajit-dev \
m4 \
musl-fts-dev \
python3 \
py3-pip \
xz \
zip \
zlib-dev \
&& true
# this is just here to make later copies easier; do not forget to change this if the python version updates
ENV PYTHON_VERSION=3.11
RUN ln -s /usr/lib/cmake/llvm10/ /usr/lib/cmake/llvm && \
ln -s /usr/include/llvm10/llvm-c/ /usr/include/llvm-c && \
ln -s /usr/include/llvm10/llvm/ /usr/include/llvm
WORKDIR /build
ENV BCC_COMMIT=v0.29.1
RUN git clone https://github.com/iovisor/bcc.git && \
cd bcc && \
git checkout $BCC_COMMIT && \
sed -i 's/<error.h>/<errno.h>/' examples/cpp/KModRetExample.cc
COPY --from=ksrc /kernel-headers.tar /build
COPY --from=ksrc /kernel-dev.tar /build
COPY --from=ksrc /kernel.tar /build
RUN tar xf /build/kernel-headers.tar && \
tar xf /build/kernel-dev.tar && \
tar xf /build/kernel.tar
RUN mkdir -p bcc/build && cd bcc/build && \
cmake .. -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-DCMAKE_C_FLAGS="-I/build/usr/include" \
-DPYTHON_CMD=python3 \
-DCMAKE_CXX_FLAGS="-I/build/usr/include" \
-DCMAKE_INSTALL_PREFIX=/usr && \
make && \
make install
RUN mkdir -p /out/usr/ && \
cp -a /build/usr/src /out/usr/ && \
cp -a /build/usr/include /out/usr
RUN mkdir -p /out/usr/lib && \
cp -a /usr/lib/libelf* /out/usr/lib/ && \
cp -a /usr/lib/libstdc* /out/usr/lib/ && \
cp -a /usr/lib/libintl* /out/usr/lib/
RUN mkdir -p /out/usr/lib/python${PYTHON_VERSION} && \
cp -a /usr/lib/python${PYTHON_VERSION}/site-packages /out/usr/lib/python${PYTHON_VERSION}/
RUN mkdir -p /out/usr/share && \
cp -a /usr/share/bcc /out/usr/share/
RUN mkdir -p /out/usr/bin && \
cp -a /usr/bin/bcc-lua /out/usr/bin/
FROM ${BUILD_IMAGE} as mirror
RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
RUN apk update && apk upgrade -a && \
apk add --no-cache --initdb -p /out \
busybox \
luajit \
python3 \
zlib \
&& true
FROM scratch
ENTRYPOINT []
CMD []
WORKDIR /
ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
COPY --from=mirror /out /
COPY --from=build /out /

View File

@@ -16,7 +16,7 @@ RM = rm -f
# Name and Org on Hub
ORG?=linuxkit
IMAGE?=kernel
IMAGE_BUILDER=linuxkit/alpine:146f540f25cd92ec8ff0c5b0c98342a9a95e479e
IMAGE_BUILDER=linuxkit/alpine:35b33c6b03c40e51046c3b053dd131a68a26c37a
# You can specify an extra options for the Makefile. This will:
# - append a config$(EXTRA) to the kernel config for your kernel/arch
@@ -25,35 +25,40 @@ EXTRA?=
DEBUG?=
ifeq ($(HASH),)
HASH_COMMIT?=HEAD # Setting this is only really useful with the show-tag target
HASH:=$(shell git ls-tree --full-tree $(HASH_COMMIT) -- $(CURDIR) | awk '{print $$3}')
ifneq ($(HASH_COMMIT),HEAD) # Others can't be dirty by definition
HASH_COMMIT?=HEAD
DIRTY:=$(shell git update-index -q --refresh && git diff-index --quiet HEAD -- $(CURDIR) || echo "-dirty")
endif
endif
# Shared files that affect all kernel builds (Dockerfiles, build yamls, scripts, etc.)
# These are combined with series-specific folders to compute per-series hashes
COMMON_DIR=common
# Compute hash for shared files from above and include Makefile from current dir
SHARED_HASH:=$(shell git ls-tree -r --full-tree $(HASH_COMMIT) -- $(CURDIR)/Makefile $(CURDIR)/$(COMMON_DIR) 2>/dev/null | git hash-object --stdin)
# Function to compute per-series hash: combines shared files hash with series folder hash
# Usage: $(call series_hash,6.12.x)
series_hash=$(shell (echo $(SHARED_HASH); git ls-tree --full-tree $(HASH_COMMIT) -- $(CURDIR)/$(1) 2>/dev/null) | git hash-object --stdin)$(DIRTY)
REPO_ROOT:=$(shell git rev-parse --show-toplevel)
# determine our architecture
BUILDERARCH=
ARCH?=$(shell uname -m)
BUILDERARCH=$(ARCH)
ifneq ($(ARCH),)
ifeq ($(ARCH),$(filter $(ARCH),x86_64 amd64))
override ARCH=x86_64
BUILDERARCH=amd64
override BUILDERARCH=amd64
endif
ifeq ($(ARCH),$(filter $(ARCH),aarch64 arm64))
override ARCH=aarch64
BUILDERARCH=arm64
override BUILDERARCH=arm64
endif
ifeq ($(ARCH),riscv64)
override BUILDERARCH=riscv64
endif
endif
ifneq ($(BUILDERARCH),)
PLATFORMS=--platforms linux/$(BUILDERARCH)
endif
HASHTAG=$(HASH)$(DIRTY)
BUILD_PLATFORM=linux/$(BUILDERARCH)
.PHONY: notdirty
notdirty:
@@ -109,6 +114,7 @@ list:
@echo "Kernels: $(KERNELS)"
@echo "Deprecated: $(DEPRECATED)"
@echo "Tools: $(TOOLS)"
@echo "Shared hash: $(SHARED_HASH)"
setforce:
$(eval FORCE=--force)
@@ -120,15 +126,17 @@ build-%: buildkernel-% buildtools-%;
buildkernel-%: buildkerneldeps-% buildplainkernel-% builddebugkernel-%;
buildkerneldeps-%: Dockerfile Makefile $(wildcard patches-$(call series,$*)/*) $(wildcard config-$(call series,$*)*) ;
buildkerneldeps-%: $(COMMON_DIR)/Dockerfile Makefile $(wildcard patches-$(call series,$*)/*) $(wildcard config-$(call series,$*)*) ;
buildplainkernel-%: buildkerneldeps-%
$(eval KERNEL_SERIES=$(call series,$*))
linuxkit pkg build . $(FORCE) $(PLATFORMS) --build-yml ./build-kernel.yml --tag "$*-{{.Hash}}" --build-arg-file $(KERNEL_SERIES)/build-args
$(eval SERIES_HASH=$(call series_hash,$(KERNEL_SERIES)))
linuxkit pkg build . $(FORCE) --platforms $(BUILD_PLATFORM) --build-yml ./$(COMMON_DIR)/build-kernel.yml --hash $(SERIES_HASH) --tag "$*-{{.Hash}}" --build-arg-file $(KERNEL_SERIES)/build-args
builddebugkernel-%: buildkerneldeps-%
$(eval KERNEL_SERIES=$(call series,$*))
linuxkit pkg build . $(FORCE) $(PLATFORMS) --build-yml ./build-kernel.yml --tag "$*-dbg-{{.Hash}}" --build-arg-file $(KERNEL_SERIES)/build-args --build-arg-file build-args-debug
$(eval SERIES_HASH=$(call series_hash,$(KERNEL_SERIES)))
linuxkit pkg build . $(FORCE) --platforms $(BUILD_PLATFORM) --build-yml ./$(COMMON_DIR)/build-kernel.yml --hash $(SERIES_HASH) --tag "$*-dbg-{{.Hash}}" --build-arg-file $(KERNEL_SERIES)/build-args --build-arg-file $(COMMON_DIR)/build-args-debug
push-%: notdirty build-% pushkernel-% tagbuilder-% pushtools-%;
@@ -143,19 +151,25 @@ tagbuilder-%: notdirty
pushkernel-%: pushplainkernel-% pushdebugkernel-%;
pushplainkernel-%: buildplainkernel-%
$(eval HASHED_IMAGE=$(shell linuxkit pkg show-tag . --build-yml ./build-kernel.yml --tag "$*-{{.Hash}}"))
$(eval PLAIN_IMAGE=$(shell linuxkit pkg show-tag . --build-yml ./build-kernel.yml --tag "$*"))
$(eval KERNEL_SERIES=$(call series,$*))
$(eval SERIES_HASH=$(call series_hash,$(KERNEL_SERIES)))
$(eval HASHED_IMAGE=$(shell linuxkit pkg show-tag . --build-yml ./$(COMMON_DIR)/build-kernel.yml --hash $(SERIES_HASH) --tag "$*-{{.Hash}}"))
$(eval PLAIN_IMAGE=$(shell linuxkit pkg show-tag . --build-yml ./$(COMMON_DIR)/build-kernel.yml --tag "$*"))
linuxkit cache push $(HASHED_IMAGE)
linuxkit cache push $(HASHED_IMAGE) --remote-name $(PLAIN_IMAGE)
pushdebugkernel-%: builddebugkernel-%
$(eval HASHED_IMAGE=$(shell linuxkit pkg show-tag . --build-yml ./build-kernel.yml --tag "$*-dbg-{{.Hash}}"))
$(eval PLAIN_IMAGE=$(shell linuxkit pkg show-tag . --build-yml ./build-kernel.yml --tag "$*-dbg"))
$(eval KERNEL_SERIES=$(call series,$*))
$(eval SERIES_HASH=$(call series_hash,$(KERNEL_SERIES)))
$(eval HASHED_IMAGE=$(shell linuxkit pkg show-tag . --build-yml ./$(COMMON_DIR)/build-kernel.yml --hash $(SERIES_HASH) --tag "$*-dbg-{{.Hash}}"))
$(eval PLAIN_IMAGE=$(shell linuxkit pkg show-tag . --build-yml ./$(COMMON_DIR)/build-kernel.yml --tag "$*-dbg"))
linuxkit cache push $(HASHED_IMAGE)
linuxkit cache push $(HASHED_IMAGE) --remote-name $(PLAIN_IMAGE)
show-tag-%:
@echo $(eval BASEIMAGE=$(call baseimage,$*))-$(HASHTAG)
$(eval KERNEL_SERIES=$(call series,$*))
$(eval SERIES_HASH=$(call series_hash,$(KERNEL_SERIES)))
@echo $(call baseimage,$*)-$(SERIES_HASH)
buildtools-%: $(addprefix buildtool-%$(RELEASESEP),$(TOOLS));
@@ -163,7 +177,8 @@ buildtool-%:
$(eval TOOL=$(call toolname,$*))
$(eval KERNEL_VERSION=$(call toolkernel,$*))
$(eval KERNEL_SERIES=$(call series,$(KERNEL_VERSION)))
linuxkit pkg build . $(FORCE) $(PLATFORMS) --build-yml ./build-$(TOOL).yml --tag "$(KERNEL_VERSION)-{{.Hash}}" --build-arg-file $(KERNEL_SERIES)/build-args
$(eval SERIES_HASH=$(call series_hash,$(KERNEL_SERIES)))
linuxkit pkg build . $(FORCE) --platforms $(BUILD_PLATFORM) --build-yml ./$(COMMON_DIR)/build-$(TOOL).yml --tag "$(KERNEL_VERSION)-$(SERIES_HASH)" --build-arg-file $(KERNEL_SERIES)/build-args
pushtools-%: $(addprefix pushtool-%$(RELEASESEP),$(TOOLS));
@@ -171,8 +186,9 @@ pushtool-%: buildtool-%
$(eval TOOL=$(call toolname,$*))
$(eval KERNEL_VERSION=$(call toolkernel,$*))
$(eval KERNEL_SERIES=$(call series,$(KERNEL_VERSION)))
$(eval HASHED_IMAGE=$(shell linuxkit pkg show-tag . --build-yml ./build-$(TOOL).yml --tag "$(KERNEL_VERSION)-{{.Hash}}"))
$(eval PLAIN_IMAGE=$(shell linuxkit pkg show-tag . --build-yml ./build-$(TOOL).yml --tag "$(KERNEL_VERSION)"))
$(eval SERIES_HASH=$(call series_hash,$(KERNEL_SERIES)))
$(eval HASHED_IMAGE=$(shell linuxkit pkg show-tag . --build-yml ./$(COMMON_DIR)/build-$(TOOL).yml --tag "$(KERNEL_VERSION)-$(SERIES_HASH)"))
$(eval PLAIN_IMAGE=$(shell linuxkit pkg show-tag . --build-yml ./$(COMMON_DIR)/build-$(TOOL).yml --tag "$(KERNEL_VERSION)"))
linuxkit cache push $(HASHED_IMAGE)
linuxkit cache push $(HASHED_IMAGE) --remote-name $(PLAIN_IMAGE)
@@ -182,11 +198,15 @@ pushtool-%: buildtool-%
# get the tag for the normal kernel for a particular version. Accepts version or series
tag-plainkernel-%:
@linuxkit pkg show-tag . --build-yml ./build-kernel.yml --tag "$*-{{.Hash}}"
$(eval KERNEL_SERIES=$(call series,$*))
$(eval SERIES_HASH=$(call series_hash,$(KERNEL_SERIES)))
@linuxkit pkg show-tag . --build-yml ./$(COMMON_DIR)/build-kernel.yml --hash $(SERIES_HASH) --tag "$*-{{.Hash}}"
# get the tag for the debug kernel for a particular version. Accepts version or series
tag-debugkernel-%:
@linuxkit pkg show-tag . --build-yml ./build-kernel.yml --tag "$*-dbg-{{.Hash}}"
$(eval KERNEL_SERIES=$(call series,$*))
$(eval SERIES_HASH=$(call series_hash,$(KERNEL_SERIES)))
@linuxkit pkg show-tag . --build-yml ./$(COMMON_DIR)/build-kernel.yml --hash $(SERIES_HASH) --tag "$*-dbg-{{.Hash}}"
# find and replace any usage of the normal kernel with hash for a particular series
# will update hash for same semver and/or patch version
@@ -206,34 +226,34 @@ update-kernel-semver-yaml-%:
update-kernel-yamls: $(addprefix update-kernel-hash-yaml-,$(KERNELS)) update-kernel-semver-yaml-$(KERNEL_HIGHEST);
# Target for kernel config
kconfig:
ifeq (${KCONFIG_TAG},)
docker build --no-cache -f Dockerfile.kconfig \
--build-arg KERNEL_VERSIONS="$(KERNEL_VERSIONS)" \
--build-arg BUILD_IMAGE=$(IMAGE_BUILDER) \
-t linuxkit/kconfig .
else
docker build --no-cache -f Dockerfile.kconfig \
--build-arg KERNEL_VERSIONS="$(KERNEL_VERSIONS)" \
--build-arg BUILD_IMAGE=$(IMAGE_BUILDER) \
-t linuxkit/kconfig:${KCONFIG_TAG} .
KCONFIG_TAG_EXTENSION=
ifneq (${KCONFIG_TAG},)
KCONFIG_TAG_EXTENSION=-${KCONFIG_TAG}
endif
kconfig:
docker build --no-cache -f $(COMMON_DIR)/Dockerfile.kconfig \
--build-arg KERNEL_VERSIONS="$(KERNEL_VERSIONS)" \
--build-arg BUILD_IMAGE=$(IMAGE_BUILDER) \
--platform $(BUILD_PLATFORM) \
-t linuxkit/kconfig:$(ARCH)${KCONFIG_TAG_EXTENSION} .
kconfigx:
ifeq (${KCONFIG_TAG},)
docker buildx build --no-cache -f Dockerfile.kconfigx \
--platform=$(PLATFORMS) \
docker buildx build --no-cache -f $(COMMON_DIR)/Dockerfile.kconfigx \
--platform $(BUILD_PLATFORM) \
--output . \
--build-arg KERNEL_VERSIONS="$(KERNEL_VERSIONS)" \
--build-arg BUILD_IMAGE=$(IMAGE_BUILDER) \
-t linuxkit/kconfigx .
-t linuxkit/kconfigx:$(ARCH) .
cp linux_arm64/config-${KERNEL_VERSIONS}-arm64 config-${KERNEL_SERIES}-aarch64
cp linux_amd64/config-${KERNEL_VERSIONS}-amd64 config-${KERNEL_SERIES}-x86_64
cp linux_amd64/config-${KERNEL_VERSIONS}-riscv64 config-${KERNEL_SERIES}-riscv64
else
docker buildx build --no-cache -f Dockerfile.kconfigx \
--platform=$(PLATFORMS) --push \
docker buildx build --no-cache -f $(COMMON_DIR)/Dockerfile.kconfigx \
--platform $(BUILD_PLATFORM) --push \
--output . \
--build-arg KERNEL_VERSIONS="$(KERNEL_VERSIONS)" \
--build-arg BUILD_IMAGE=$(IMAGE_BUILDER) \
-t linuxkit/kconfigx:${KCONFIG_TAG} .
-t linuxkit/kconfigx:$(ARCH)${KCONFIG_TAG_EXTENSION} .
endif

View File

@@ -1,2 +0,0 @@
image: kernel-bcc
network: true

View File

@@ -1,2 +0,0 @@
image: kernel
network: true

View File

@@ -1,2 +0,0 @@
image: kernel-perf
network: true

205
kernel/common/Dockerfile Normal file
View File

@@ -0,0 +1,205 @@
ARG BUILD_IMAGE
FROM ${BUILD_IMAGE} AS kernel-build
ARG BUILD_IMAGE
RUN apk add \
argp-standalone \
automake \
bash \
bc \
binutils-dev \
bison \
build-base \
curl \
diffutils \
findutils \
flex \
git \
gmp-dev \
gnupg \
installkernel \
kmod \
elfutils-dev \
libunwind-dev \
linux-headers \
mpc1-dev \
mpfr-dev \
ncurses-dev \
openssl \
openssl-dev \
patch \
rsync \
sed \
squashfs-tools \
tar \
xz \
xz-dev \
zlib-dev
ARG KERNEL_VERSION
ARG KERNEL_SERIES
ARG EXTRA
ARG DEBUG
# We copy the entire directory. This copies some unneeded files, but
# allows us to check for the existence /${KERNEL_SERIES}/patches to
# build kernels without patches.
COPY / /src/
RUN mkdir -p /out/src
# Download and verify kernel
# PGP keys: 589DA6B1 (greg@kroah.com) & 6092693E (autosigner@kernel.org) & 00411886 (torvalds@linux-foundation.org)
RUN KERNEL_MAJOR=$(echo ${KERNEL_VERSION} | cut -d . -f 1) && \
KERNEL_MAJOR=v${KERNEL_MAJOR}.x && \
KERNEL_SOURCE=https://www.kernel.org/pub/linux/kernel/${KERNEL_MAJOR}/linux-${KERNEL_VERSION}.tar.xz && \
KERNEL_SHA256_SUMS=https://www.kernel.org/pub/linux/kernel/${KERNEL_MAJOR}/sha256sums.asc && \
KERNEL_PGP2_SIGN=https://www.kernel.org/pub/linux/kernel/${KERNEL_MAJOR}/linux-${KERNEL_VERSION}.tar.sign && \
curl -fsSLO ${KERNEL_SHA256_SUMS} && \
gpg2 -q --import /src/common/keys.asc && \
gpg2 --verify sha256sums.asc && \
KERNEL_SHA256=$(grep linux-${KERNEL_VERSION}.tar.xz sha256sums.asc | cut -d ' ' -f 1) && \
[ -f linux-${KERNEL_VERSION}.tar.xz ] || curl -fsSLO ${KERNEL_SOURCE} && \
echo "${KERNEL_SHA256} linux-${KERNEL_VERSION}.tar.xz" | sha256sum -c - && \
xz -d linux-${KERNEL_VERSION}.tar.xz && \
curl -fsSLO ${KERNEL_PGP2_SIGN} && \
gpg2 --verify linux-${KERNEL_VERSION}.tar.sign linux-${KERNEL_VERSION}.tar && \
cat linux-${KERNEL_VERSION}.tar | tar --absolute-names -x && mv /linux-${KERNEL_VERSION} /linux && \
printf "KERNEL_SOURCE=${KERNEL_SOURCE}\n" > /out/kernel-source-info
WORKDIR /tmp
# Download Intel ucode, create a CPIO archive for it, and keep it in the build context
# so the firmware can also be referenced with CONFIG_EXTRA_FIRMWARE
ENV UCODE_REPO=https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files
ENV UCODE_COMMIT=microcode-20210608
RUN set -e && \
if [ $(uname -m) == x86_64 ]; then \
git clone ${UCODE_REPO} ucode && \
cd ucode && \
git checkout ${UCODE_COMMIT} && \
iucode_tool --normal-earlyfw --write-earlyfw=/out/intel-ucode.cpio ./intel-ucode && \
cp license /out/intel-ucode-license.txt && \
mkdir -p /lib/firmware && \
cp -rav ./intel-ucode /lib/firmware; \
fi
WORKDIR /linux
# Apply local specific patches if present
RUN set -e && \
if [ -n "${EXTRA}" ] && [ -d /src/${KERNEL_SERIES}${EXTRA}/patches ]; then \
echo "Patching ${EXTRA} kernel"; \
for patch in /src/${KERNEL_SERIES}${EXTRA}/patches/*.patch; do \
echo "Applying $patch"; \
patch -t -F0 -N -u -p1 < "$patch"; \
done; \
fi
# Apply local common patches if present
RUN set -e && \
if [ -d /src/${KERNEL_SERIES}/patches ]; then \
for patch in /src/${KERNEL_SERIES}/patches/*.patch; do \
echo "Applying $patch"; \
patch -t -F0 -N -u -p1 < "$patch"; \
done; \
fi
# Save kernel source
RUN XZ_DEFAULTS="-T0" tar cJf /out/src/linux.tar.xz /linux
# Kernel config
RUN case $(uname -m) in \
x86_64) \
KERNEL_DEF_CONF=/linux/arch/x86/configs/x86_64_defconfig; \
;; \
aarch64) \
KERNEL_DEF_CONF=/linux/arch/arm64/configs/defconfig; \
;; \
riscv64) \
KERNEL_DEF_CONF=/linux/arch/riscv/configs/defconfig; \
;; \
esac && \
cp /src/${KERNEL_SERIES}/config-$(uname -m) ${KERNEL_DEF_CONF}; \
if [ -n "${EXTRA}" ] && [ -f "/src/${KERNEL_SERIES}-${EXTRA}/config-$(uname -m)" ]; then \
cat /src/${KERNEL_SERIES}-${EXTRA}/config-$(uname -m) >> ${KERNEL_DEF_CONF}; \
fi; \
sed -i "s/CONFIG_LOCALVERSION=\"-linuxkit\"/CONFIG_LOCALVERSION=\"-linuxkit${EXTRA}${DEBUG}\"/" ${KERNEL_DEF_CONF}; \
if [ -n "${DEBUG}" ]; then \
sed -i 's/CONFIG_PANIC_ON_OOPS=y/# CONFIG_PANIC_ON_OOPS is not set/' ${KERNEL_DEF_CONF}; \
cat /src/common/config${DEBUG} >> ${KERNEL_DEF_CONF}; \
fi && \
make defconfig && \
make oldconfig && \
if [ -z "${EXTRA}" ] && [ -z "${DEBUG}" ]; then diff -u .config ${KERNEL_DEF_CONF}; fi
# Kernel
RUN make -j "$(getconf _NPROCESSORS_ONLN)" KCFLAGS="-fno-pie" && \
case $(uname -m) in \
x86_64) \
cp arch/x86_64/boot/bzImage /out/kernel; \
;; \
aarch64) \
if [ -f arch/arm64/boot/Image.gz ]; then \
cp arch/arm64/boot/Image.gz /out/kernel; \
elif [ -f arch/arm64/boot/vmlinuz.efi ]; then \
cp arch/arm64/boot/vmlinuz.efi /out/kernel; \
else \
echo "Error: Neither Image.gz nor vmlinuz.efi found for aarch64" >&2; exit 1; \
fi \
;; \
riscv64) \
if [ -f arch/riscv/boot/Image.gz ]; then \
cp arch/riscv/boot/Image.gz /out/kernel; \
elif [ -f arch/riscv/boot/vmlinuz.efi ]; then \
cp arch/riscv/boot/vmlinuz.efi /out/kernel; \
else \
echo "Error: Neither Image.gz nor vmlinuz.efi found for riscv64" >&2; exit 1; \
fi \
;; \
esac && \
cp System.map /out && \
([ -n "${DEBUG}" ] && cp vmlinux /out || true)
# Modules and Device Tree binaries
RUN make INSTALL_MOD_PATH=/tmp/kernel-modules modules_install && \
( DVER=$(basename $(find /tmp/kernel-modules/lib/modules/ -mindepth 1 -maxdepth 1)) && \
cd /tmp/kernel-modules/lib/modules/$DVER && \
rm -f build source && \
ln -s /usr/src/linux-headers-$DVER build ) && \
case $(uname -m) in \
aarch64) \
make INSTALL_DTBS_PATH=/tmp/kernel-modules/boot/dtb dtbs_install; \
;; \
esac && \
( cd /tmp/kernel-modules && tar cf /out/kernel.tar . )
# Headers (userspace API)
RUN mkdir -p /tmp/kernel-headers/usr && \
make INSTALL_HDR_PATH=/tmp/kernel-headers/usr headers_install && \
( cd /tmp/kernel-headers && tar cf /out/kernel-headers.tar usr )
# Headers (kernel development)
RUN DVER=$(basename $(find /tmp/kernel-modules/lib/modules/ -mindepth 1 -maxdepth 1)) && \
dir=/tmp/usr/src/linux-headers-$DVER && \
mkdir -p $dir && \
cp /linux/.config $dir && \
cp /linux/Module.symvers $dir && \
find . -path './include/*' -prune -o \
-path './arch/*/include' -prune -o \
-path './scripts/*' -prune -o \
-type f \( -name 'Makefile*' -o -name 'Kconfig*' -o -name 'Kbuild*' -o \
-name '*.lds' -o -name '*.pl' -o -name '*.sh' -o \
-name 'objtool' -o -name 'fixdep' -o -name 'randomize_layout_seed.h' \) | \
tar cf - -T - | (cd $dir; tar xf -) && \
( cd /tmp && tar cf /out/kernel-dev.tar usr/src )
RUN printf "${BUILD_IMAGE}" > /out/kernel-builder
FROM scratch
ARG BUILD_IMAGE
ENTRYPOINT []
CMD []
WORKDIR /
LABEL org.mobyproject.linuxkit.kernel.buildimage=${BUILD_IMAGE}
COPY --from=kernel-build /out/* /

View File

@@ -0,0 +1,82 @@
ARG BUILD_IMAGE
ARG KERNEL_VERSION
ARG PKG_HASH
FROM linuxkit/kernel:${KERNEL_VERSION}-${PKG_HASH} as ksrc
FROM ${BUILD_IMAGE} AS build
RUN apk update && apk upgrade -a && \
apk add --no-cache \
argp-standalone \
autoconf \
automake \
bison \
build-base \
clang \
clang-dev \
clang-static \
cmake \
curl \
elfutils-dev \
flex-dev \
gettext-dev \
git \
iperf3 \
libedit-dev \
libtool \
libxml2 \
llvm19 \
llvm19-dev \
llvm19-static \
llvm19-gtest \
m4 \
musl-fts-dev \
python3 \
py3-pip \
xz \
zip \
zlib-dev \
&& true
WORKDIR /build
COPY --from=ksrc /kernel-headers.tar /build
COPY --from=ksrc /kernel-dev.tar /build
COPY --from=ksrc /kernel.tar /build
RUN tar xf /build/kernel-headers.tar && \
tar xf /build/kernel-dev.tar && \
tar xf /build/kernel.tar
RUN mkdir -p /out/usr/ && \
cp -a /build/usr/src /out/usr/ && \
cp -a /build/usr/include /out/usr
RUN mkdir -p /out/usr/lib && \
cp -a /usr/lib/libelf* /out/usr/lib/ && \
cp -a /usr/lib/libstdc* /out/usr/lib/ && \
cp -a /usr/lib/libintl* /out/usr/lib/
RUN PYTHONPATH=$(python3 -c "import sysconfig; print(sysconfig.get_path('stdlib'))") && mkdir -p /out${PYTHONPATH} && \
cp -a ${PYTHONPATH}/site-packages /out/${PYTHONPATH}
FROM ${BUILD_IMAGE} as mirror
RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
RUN apk update && apk upgrade -a && \
apk add --no-cache --initdb -p /out \
bcc \
bcc-dev \
bcc-tools \
busybox \
python3 \
zlib \
&& true
# lua/luajit is not available on all platforms, but we do not consider it blocking
RUN apk add --no-cache -p /out luajit || true
RUN apk add --no-cache -p /out bcc-lua || true
FROM scratch
ENTRYPOINT []
CMD []
WORKDIR /
ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
COPY --from=mirror /out /
COPY --from=build /out /

View File

@@ -43,8 +43,9 @@ RUN set -e && \
patch -t -F0 -N -u -p1 < "$patch"; \
done; \
fi && \
[ ! -f /config-${SERIES}-x86_64 ] || mv /config-${SERIES}-x86_64 arch/x86/configs/x86_64_defconfig && \
[ ! -f /config-${SERIES}-x86_64 ] || mv /config-${SERIES}-x86_64 arch/x86/configs/x86_64_defconfig ; \
[ ! -f /config-${SERIES}-aarch64 ] || mv /config-${SERIES}-aarch64 arch/arm64/configs/defconfig ; \
[ ! -f /config-${SERIES}-riscv64 ] || mv /config-${SERIES}-riscv64 arch/riscv64/configs/riscv64_defconfig ; \
done
ENTRYPOINT ["/bin/sh"]

View File

@@ -58,6 +58,9 @@ for VERSION in ${KERNEL_VERSIONS}; do
elif [ ${TARGETARCH} = "arm64" ] ; then
cp /config-${SERIES}-aarch64 .config
ARCH=arm64 make oldconfig
elif [ ${TARGETARCH} = "riscv64" ] ; then
cp /config-${SERIES}-riscv64 .config
ARCH=riscv64 make oldconfig
fi
done
EOF

View File

@@ -1,8 +1,10 @@
# This Dockerfile extracts the source code and headers from a kernel package,
# builds the perf utility, and places it into a scratch image
ARG BUILD_IMAGE
ARG KERNEL_VERSION
ARG PKG_HASH
FROM ${KERNEL_VERSION}-${HASH} AS ksrc
FROM linuxkit/kernel:${KERNEL_VERSION}-${PKG_HASH} as ksrc
FROM ${BUILD_IMAGE} AS build
RUN apk add \
@@ -51,7 +53,7 @@ RUN make -C libtraceevent all install V=1
WORKDIR /linux
RUN mkdir -p /out && \
make -C tools/perf LDFLAGS=-static V=1 && \
make -C tools/perf EXTRA_CFLAGS="-Wno-alloc-size -Wno-calloc-transposed-args" LDFLAGS=-static V=1 && \
strip tools/perf/perf && \
cp tools/perf/perf /out

View File

@@ -0,0 +1,3 @@
image: kernel-bcc
network: true
dockerfile: common/Dockerfile.bcc

View File

@@ -0,0 +1,3 @@
image: kernel
network: true
dockerfile: common/Dockerfile

View File

@@ -0,0 +1,3 @@
image: kernel-perf
network: true
dockerfile: common/Dockerfile.perf

View File

@@ -1,5 +1,5 @@
kernel:
image: linuxkit/kernel:6.6.13
image: linuxkit/kernel:6.12.59
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
init:
- "@pkg:./pkg/init"

View File

@@ -1,16 +1,16 @@
kernel:
image: linuxkit/kernel:6.6.13
image: linuxkit/kernel:6.12.59
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
init:
- linuxkit/init:45a1ad5919f0b6acf0f0cf730e9434abfae11fe6
- linuxkit/runc:6062483d748609d505f2bcde4e52ee64a3329f5f
- linuxkit/containerd:e7a92d9f3282039eac5fb1b07cac2b8664cbf0ad
- linuxkit/ca-certificates:5aaa343474e5ac3ac01f8b917e82efb1063d80ff
- linuxkit/init:b5506cc74a6812dc40982cacfd2f4328f8a4b12a
- linuxkit/runc:9442aa234715e751a16144f1d4ae3fd1a00fd492
- linuxkit/containerd:ba19f64efd3331a8fd0a33e00eabd14f6ee1780e
- linuxkit/ca-certificates:256f1950df59f2f209e9f0b81374177409eb11de
onboot:
- name: sysctl
image: linuxkit/sysctl:5a374e4bf3e5a7deeacff6571d0f30f7ea8f56db
image: linuxkit/sysctl:43ac1d39da329c3567fcb9689e5ca99de6d169b6
- name: dhcpcd
image: linuxkit/dhcpcd:e9e3580f2de00e73e7b316a007186d22fea056ee
image: linuxkit/dhcpcd:b87e9ececac55a65eaa592f4dd8b4e0c3009afdb
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
onshutdown:
- name: shutdown
@@ -18,11 +18,11 @@ onshutdown:
command: ["/bin/echo", "so long and thanks for all the fish"]
services:
- name: getty
image: linuxkit/getty:5d86a2ce2d890c14ab66b13638dcadf74f29218b
image: linuxkit/getty:a86d74c8f89be8956330c3b115b0b1f2e09ef6e0
env:
- INSECURE=true
- name: rngd
image: linuxkit/rngd:cdb919e4aee49fed0bf6075f0a104037cba83c39
image: linuxkit/rngd:984eb580ecb63986f07f626b61692a97aacd7198
- name: nginx
image: nginx:1.19.5-alpine
capabilities:

View File

@@ -1,4 +1,4 @@
FROM linuxkit/alpine:146f540f25cd92ec8ff0c5b0c98342a9a95e479e AS mirror
FROM linuxkit/alpine:7f3944798557de5518a56e3437d7ed982701f224 AS mirror
RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
RUN apk add --no-cache --initdb -p /out \
@@ -6,7 +6,7 @@ RUN apk add --no-cache --initdb -p /out \
busybox
RUN rm -rf /out/etc/apk /out/lib/apk /out/var/cache
FROM linuxkit/alpine:146f540f25cd92ec8ff0c5b0c98342a9a95e479e AS mirror2
FROM linuxkit/alpine:7f3944798557de5518a56e3437d7ed982701f224 AS mirror2
RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
RUN apk add --no-cache --initdb -p /out \
acpid

View File

@@ -1,4 +1,4 @@
FROM linuxkit/alpine:146f540f25cd92ec8ff0c5b0c98342a9a95e479e AS mirror
FROM linuxkit/alpine:7f3944798557de5518a56e3437d7ed982701f224 AS mirror
RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
RUN apk add --initdb -p /out alpine-baselayout apk-tools audit busybox tini

View File

@@ -1,15 +1,8 @@
# Use Debian testing Qemu 4.2.0 until https://bugs.alpinelinux.org/issues/8131 is resolved.
FROM debian@sha256:d828cca5497a2519da9c6d42372066895fa28a69f1e8a46a38ce8f750bd2adf0 AS qemu
RUN apt-get update && apt-get install -y qemu-user-static && \
mv /usr/bin/qemu-aarch64-static /usr/bin/qemu-aarch64 && \
mv /usr/bin/qemu-arm-static /usr/bin/qemu-arm && \
mv /usr/bin/qemu-ppc64le-static /usr/bin/qemu-ppc64le && \
mv /usr/bin/qemu-s390x-static /usr/bin/qemu-s390x && \
mv /usr/bin/qemu-riscv64-static /usr/bin/qemu-riscv64 && \
mv /usr/bin/qemu-loongarch64-static /usr/bin/qemu-loongarch64 && \
rm /usr/bin/qemu-*-static
# Use Debian testing-slim Qemu 4.2.0 until https://bugs.alpinelinux.org/issues/8131 is resolved.
FROM debian@sha256:80381085775a6e69f0f8d09dd9a39495063e348382eb8d4881ba6f142d24b8ab AS qemu
RUN apt-get update && apt-get install -y qemu-user-static
FROM linuxkit/alpine:146f540f25cd92ec8ff0c5b0c98342a9a95e479e AS mirror
FROM linuxkit/alpine:7f3944798557de5518a56e3437d7ed982701f224 AS mirror
RUN apk add --no-cache go musl-dev
ENV GOPATH=/go PATH=$PATH:/go/bin

View File

@@ -1,4 +1,4 @@
FROM linuxkit/alpine:146f540f25cd92ec8ff0c5b0c98342a9a95e479e AS build
FROM linuxkit/alpine:7f3944798557de5518a56e3437d7ed982701f224 AS build
RUN apk add --update \
bison \
build-base \

View File

@@ -1,4 +1,4 @@
FROM linuxkit/alpine:146f540f25cd92ec8ff0c5b0c98342a9a95e479e as alpine
FROM linuxkit/alpine:7f3944798557de5518a56e3437d7ed982701f224 as alpine
RUN apk add ca-certificates

View File

@@ -1,4 +1,4 @@
FROM linuxkit/alpine:146f540f25cd92ec8ff0c5b0c98342a9a95e479e as build
FROM linuxkit/alpine:7f3944798557de5518a56e3437d7ed982701f224 as build
RUN apk add --no-cache bash go git musl-dev linux-headers make patch
# Hack to work around an issue with go on arm64 requiring gcc
@@ -7,7 +7,7 @@ RUN [ $(uname -m) = aarch64 ] && apk add --no-cache gcc || true
ENV GOPATH=/go PATH=$PATH:/go/bin
ENV GITBASE=github.com/google
ENV GITREPO=github.com/google/cadvisor
ENV COMMIT=v0.36.0
ENV COMMIT=v0.51.0
ADD /static.patch /tmp/
@@ -18,10 +18,10 @@ RUN mkdir -p /go/src/${GITBASE} \
&& git checkout ${COMMIT} \
&& patch -p1 build/build.sh </tmp/static.patch \
&& make build \
&& mv cadvisor /usr/bin/
&& mv _output/cadvisor /usr/bin/
FROM linuxkit/alpine:146f540f25cd92ec8ff0c5b0c98342a9a95e479e AS mirror
FROM linuxkit/alpine:7f3944798557de5518a56e3437d7ed982701f224 AS mirror
RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
RUN apk add --no-cache --initdb -p /out \

View File

@@ -3,6 +3,7 @@ network: true
arches:
- amd64
- arm64
- riscv64
config:
pid: host
binds:

View File

@@ -1,6 +1,6 @@
--- build/build.sh.orig 2017-11-16 16:29:18.281342577 +0000
+++ build/build.sh 2017-11-16 16:29:55.534787421 +0000
@@ -44,6 +44,7 @@
@@ -47,6 +47,7 @@
-X ${repo_path}/version.BuildDate${ldseparator}${BUILD_DATE}
-X ${repo_path}/version.GoVersion${ldseparator}${go_version}"

View File

@@ -1,15 +1,15 @@
# Dockerfile to build linuxkit/containerd for linuxkit
FROM linuxkit/alpine:146f540f25cd92ec8ff0c5b0c98342a9a95e479e as alpine
FROM linuxkit/alpine:7f3944798557de5518a56e3437d7ed982701f224 as alpine
RUN apk add tzdata binutils
RUN mkdir -p /etc/init.d && ln -s /usr/bin/service /etc/init.d/020-containerd
FROM linuxkit/containerd-dev:25522a7fcffd14465d807fadc3d3e4f6da7b10ec as containerd-dev
FROM linuxkit/containerd-dev:3cb13cb53e9901cd9e8a8c087e4599b9bdbe8931 as containerd-dev
FROM scratch
ENTRYPOINT []
WORKDIR /
COPY --from=containerd-dev /usr/bin/containerd /usr/bin/ctr /usr/bin/containerd-shim /usr/bin/containerd-shim-runc-v2 /usr/bin/
COPY --from=containerd-dev /usr/bin/containerd /usr/bin/ctr /usr/bin/containerd-shim-runc-v2 /usr/bin/
COPY --from=alpine /usr/share/zoneinfo/UTC /etc/localtime
COPY --from=alpine /etc/init.d/ /etc/init.d/
COPY etc etc/

View File

@@ -1,6 +1,10 @@
version = 2
state = "/run/containerd"
root = "/var/lib/containerd"
disabled_plugins = ["cri"]
[plugins."io.containerd.grpc.v1.cri"]
disabled = true
[grpc]
address = "/run/containerd/containerd.sock"

View File

@@ -1,4 +1,4 @@
FROM linuxkit/alpine:146f540f25cd92ec8ff0c5b0c98342a9a95e479e AS mirror
FROM linuxkit/alpine:7f3944798557de5518a56e3437d7ed982701f224 AS mirror
RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
RUN apk add --no-cache --initdb -p /out \
alpine-baselayout \

View File

@@ -1,4 +1,4 @@
FROM linuxkit/alpine:146f540f25cd92ec8ff0c5b0c98342a9a95e479e AS mirror
FROM linuxkit/alpine:7f3944798557de5518a56e3437d7ed982701f224 AS mirror
RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
RUN apk add --no-cache --initdb -p /out \
alpine-baselayout \

View File

@@ -1,4 +1,4 @@
FROM linuxkit/alpine:146f540f25cd92ec8ff0c5b0c98342a9a95e479e AS build
FROM linuxkit/alpine:7f3944798557de5518a56e3437d7ed982701f224 AS build
RUN apk add --no-cache --initdb make
FROM scratch

View File

@@ -1,4 +1,4 @@
FROM linuxkit/alpine:146f540f25cd92ec8ff0c5b0c98342a9a95e479e AS mirror
FROM linuxkit/alpine:7f3944798557de5518a56e3437d7ed982701f224 AS mirror
RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
RUN apk add --no-cache --initdb -p /out \
@@ -15,7 +15,7 @@ RUN apk add --no-cache --initdb -p /out \
&& true
RUN rm -rf /out/etc/apk /out/lib/apk /out/var/cache
FROM linuxkit/alpine:146f540f25cd92ec8ff0c5b0c98342a9a95e479e AS build
FROM linuxkit/alpine:7f3944798557de5518a56e3437d7ed982701f224 AS build
RUN apk add --no-cache go musl-dev
ENV GOPATH=/go PATH=$PATH:/go/bin

View File

@@ -22,8 +22,9 @@ import (
const timeout = 60
var (
fsTypeVar string
driveKeys []string
fsTypeVar string
stopOnError bool
driveKeys []string
)
// Fdisk is the JSON output from libfdisk
@@ -57,7 +58,12 @@ func autoextend(fsType string) error {
continue
}
if err := extend(d, fsType); err != nil {
return err
if stopOnError {
return err
}
log.Printf("Could not extend partition on device %s. Skipping", d)
continue
}
}
return nil
@@ -76,6 +82,11 @@ func extend(d, fsType string) error {
return fmt.Errorf("Unable to unmarshal partition table from sfdisk: %v", err)
}
if len(f.PartitionTable.Partitions) == 0 {
log.Printf("Disk %s has no partitions. Skipping", d)
return nil
}
if len(f.PartitionTable.Partitions) > 1 {
log.Printf("Disk %s has more than 1 partition. Skipping", d)
return nil
@@ -312,11 +323,13 @@ func findDrives() {
func init() {
flag.StringVar(&fsTypeVar, "type", "ext4", "Type of filesystem to create")
flag.BoolVar(&stopOnError, "stop-on-error", true, "Stops extending the remaining devices on first error")
}
func main() {
flag.Parse()
findDrives()
if flag.NArg() == 0 {
if err := autoextend(fsTypeVar); err != nil {
log.Fatalf("%v", err)

View File

@@ -1,5 +1,5 @@
module github.com/linuxkit/linuxkit/pkg/extend
go 1.15
go 1.21
require golang.org/x/sys v0.0.0-20170802141912-e312636bdaa2
require golang.org/x/sys v0.22.0

View File

@@ -1,2 +1,2 @@
golang.org/x/sys v0.0.0-20170802141912-e312636bdaa2 h1:rn9VfHLpovNshEHhLAFADpPdWI+EUYgtyaUcQysy5P8=
golang.org/x/sys v0.0.0-20170802141912-e312636bdaa2/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI=
golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=

View File

@@ -1,3 +0,0 @@
# This source code refers to The Go Authors for copyright purposes.
# The master list of authors is in the main Go distribution,
# visible at http://tip.golang.org/AUTHORS.

View File

@@ -1,3 +0,0 @@
# This source code was written by the Go contributors.
# The master list of contributors is in the main Go distribution,
# visible at http://tip.golang.org/CONTRIBUTORS.

View File

@@ -1 +1,2 @@
_obj/
unix.test

View File

@@ -14,7 +14,7 @@ migrating the build system to use containers so the builds are reproducible.
This is being done on an OS-by-OS basis. Please update this documentation as
components of the build system change.
### Old Build System (currently for `GOOS != "Linux" || GOARCH == "sparc64"`)
### Old Build System (currently for `GOOS != "linux"`)
The old build system generates the Go files based on the C header files
present on your system. This means that files
@@ -32,9 +32,9 @@ To build the files for your current OS and architecture, make sure GOOS and
GOARCH are set correctly and run `mkall.sh`. This will generate the files for
your specific system. Running `mkall.sh -n` shows the commands that will be run.
Requirements: bash, perl, go
Requirements: bash, go
### New Build System (currently for `GOOS == "Linux" && GOARCH != "sparc64"`)
### New Build System (currently for `GOOS == "linux"`)
The new build system uses a Docker container to generate the go files directly
from source checkouts of the kernel and various system libraries. This means
@@ -52,14 +52,14 @@ system and have your GOOS and GOARCH set accordingly. Running `mkall.sh` will
then generate all of the files for all of the GOOS/GOARCH pairs in the new build
system. Running `mkall.sh -n` shows the commands that will be run.
Requirements: bash, perl, go, docker
Requirements: bash, go, docker
## Component files
This section describes the various files used in the code generation process.
It also contains instructions on how to modify these files to add a new
architecture/OS or to add additional syscalls, types, or constants. Note that
if you are using the new build system, the scripts cannot be called normally.
if you are using the new build system, the scripts/programs cannot be called normally.
They must be called from within the docker container.
### asm files
@@ -76,30 +76,30 @@ arguments can be passed to the kernel. The third is for low-level use by the
ForkExec wrapper. Unlike the first two, it does not call into the scheduler to
let it know that a system call is running.
When porting Go to an new architecture/OS, this file must be implemented for
When porting Go to a new architecture/OS, this file must be implemented for
each GOOS/GOARCH pair.
### mksysnum
Mksysnum is a script located at `${GOOS}/mksysnum.pl` (or `mksysnum_${GOOS}.pl`
for the old system). This script takes in a list of header files containing the
Mksysnum is a Go program located at `${GOOS}/mksysnum.go` (or `mksysnum_${GOOS}.go`
for the old system). This program takes in a list of header files containing the
syscall number declarations and parses them to produce the corresponding list of
Go numeric constants. See `zsysnum_${GOOS}_${GOARCH}.go` for the generated
constants.
Adding new syscall numbers is mostly done by running the build on a sufficiently
new installation of the target OS (or updating the source checkouts for the
new build system). However, depending on the OS, you make need to update the
new build system). However, depending on the OS, you may need to update the
parsing in mksysnum.
### mksyscall.pl
### mksyscall.go
The `syscall.go`, `syscall_${GOOS}.go`, `syscall_${GOOS}_${GOARCH}.go` are
hand-written Go files which implement system calls (for unix, the specific OS,
or the specific OS/Architecture pair respectively) that need special handling
and list `//sys` comments giving prototypes for ones that can be generated.
The mksyscall.pl script takes the `//sys` and `//sysnb` comments and converts
The mksyscall.go program takes the `//sys` and `//sysnb` comments and converts
them into syscalls. This requires the name of the prototype in the comment to
match a syscall number in the `zsysnum_${GOOS}_${GOARCH}.go` file. The function
prototype can be exported (capitalized) or not.
@@ -107,7 +107,7 @@ prototype can be exported (capitalized) or not.
Adding a new syscall often just requires adding a new `//sys` function prototype
with the desired arguments and a capitalized name so it is exported. However, if
you want the interface to the syscall to be different, often one will make an
unexported `//sys` prototype, an then write a custom wrapper in
unexported `//sys` prototype, and then write a custom wrapper in
`syscall_${GOOS}.go`.
### types files
@@ -137,7 +137,7 @@ some `#if/#elif` macros in your include statements.
This script is used to generate the system's various constants. This doesn't
just include the error numbers and error strings, but also the signal numbers
an a wide variety of miscellaneous constants. The constants come from the list
and a wide variety of miscellaneous constants. The constants come from the list
of include files in the `includes_${uname}` variable. A regex then picks out
the desired `#define` statements, and generates the corresponding Go constants.
The error numbers and strings are generated from `#include <errno.h>`, and the
@@ -149,10 +149,21 @@ To add a constant, add the header that includes it to the appropriate variable.
Then, edit the regex (if necessary) to match the desired constant. Avoid making
the regex too broad to avoid matching unintended constants.
### internal/mkmerge
This program is used to extract duplicate const, func, and type declarations
from the generated architecture-specific files listed below, and merge these
into a common file for each OS.
The merge is performed in the following steps:
1. Construct the set of common code that is idential in all architecture-specific files.
2. Write this common code to the merged file.
3. Remove the common code from all architecture-specific files.
## Generated files
### `zerror_${GOOS}_${GOARCH}.go`
### `zerrors_${GOOS}_${GOARCH}.go`
A file containing all of the system's generated error numbers, error strings,
signal numbers, and constants. Generated by `mkerrors.sh` (see above).
@@ -160,7 +171,7 @@ signal numbers, and constants. Generated by `mkerrors.sh` (see above).
### `zsyscall_${GOOS}_${GOARCH}.go`
A file containing all the generated syscalls for a specific GOOS and GOARCH.
Generated by `mksyscall.pl` (see above).
Generated by `mksyscall.go` (see above).
### `zsysnum_${GOOS}_${GOARCH}.go`

Some files were not shown because too many files have changed in this diff Show More