Merge pull request #3729 from deitch/extract-more-yaml

extract more hard-coded yaml
This commit is contained in:
Avi Deitcher 2021-11-05 09:21:44 -04:00 committed by GitHub
commit c07b11acb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 16 deletions

View File

@ -2,6 +2,7 @@ package moby
import (
"crypto/sha256"
_ "embed"
"fmt"
"io"
"io/ioutil"
@ -13,22 +14,9 @@ import (
log "github.com/sirupsen/logrus"
)
var linuxkitYaml = map[string]string{"mkimage": `
kernel:
image: linuxkit/kernel:4.9.39
cmdline: "console=ttyS0"
init:
- linuxkit/init:43c52456571369d62882605e4d510f0df3ed93de
- linuxkit/runc:5f9941eed05f58293f928c9f2f0b6a3f9f6f55c1
onboot:
- name: mkimage
image: linuxkit/mkimage:fa71899c159d8c1ae63a02a22fe8db113c4e540c
- name: poweroff
image: linuxkit/poweroff:afe4b3ab865afe1e3ed5c88e58f57808f4f5119f
trust:
org:
- linuxkit
`}
//go:embed mkimage.yaml
var linuxkitYamlStr string
var linuxkitYaml = map[string]string{"mkimage": linuxkitYamlStr}
func imageFilename(name string) string {
yaml := linuxkitYaml[name]

View File

@ -0,0 +1,14 @@
kernel:
image: linuxkit/kernel:4.9.39
cmdline: "console=ttyS0"
init:
- linuxkit/init:43c52456571369d62882605e4d510f0df3ed93de
- linuxkit/runc:5f9941eed05f58293f928c9f2f0b6a3f9f6f55c1
onboot:
- name: mkimage
image: linuxkit/mkimage:fa71899c159d8c1ae63a02a22fe8db113c4e540c
- name: poweroff
image: linuxkit/poweroff:afe4b3ab865afe1e3ed5c88e58f57808f4f5119f
trust:
org:
- linuxkit