mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-09-08 18:30:35 +00:00
extract more hard-coded yaml
Signed-off-by: Avi Deitcher <avi@deitcher.net>
This commit is contained in:
@@ -2,6 +2,7 @@ package moby
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/sha256"
|
"crypto/sha256"
|
||||||
|
_ "embed"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
@@ -13,22 +14,9 @@ import (
|
|||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
var linuxkitYaml = map[string]string{"mkimage": `
|
//go:embed mkimage.yaml
|
||||||
kernel:
|
var linuxkitYamlStr string
|
||||||
image: linuxkit/kernel:4.9.39
|
var linuxkitYaml = map[string]string{"mkimage": linuxkitYamlStr}
|
||||||
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
|
|
||||||
`}
|
|
||||||
|
|
||||||
func imageFilename(name string) string {
|
func imageFilename(name string) string {
|
||||||
yaml := linuxkitYaml[name]
|
yaml := linuxkitYaml[name]
|
||||||
|
14
src/cmd/linuxkit/moby/mkimage.yaml
Normal file
14
src/cmd/linuxkit/moby/mkimage.yaml
Normal 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
|
Reference in New Issue
Block a user