mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 17:26:28 +00:00
Merge pull request #2041 from ijc/service-client
Custom containerd client for use in init.
This commit is contained in:
commit
3dbcf0d053
@ -2,9 +2,9 @@ kernel:
|
||||
image: "linuxkit/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0 page_poison=1"
|
||||
init:
|
||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
||||
- linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
||||
onboot:
|
||||
- name: sysctl
|
||||
|
@ -2,7 +2,7 @@ kernel:
|
||||
image: "linuxkit/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0 page_poison=1"
|
||||
init:
|
||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
||||
- linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b1766e4c4c09f63ac4925a6e4612852a93f7e73b
|
||||
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
||||
|
@ -2,9 +2,9 @@ kernel:
|
||||
image: "linuxkit/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0 console=tty0 page_poison=1"
|
||||
init:
|
||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
||||
- linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
||||
onboot:
|
||||
- name: sysctl
|
||||
@ -20,7 +20,7 @@ onboot:
|
||||
command: ["/mount.sh", "/var/lib/docker"]
|
||||
services:
|
||||
- name: getty
|
||||
image: "linuxkit/getty:886d35fe30c47750e8cfbf2f73016e9d2cc6361a"
|
||||
image: "linuxkit/getty:d0765e0a14733f9454010ac109a7c846a4e67fc5"
|
||||
env:
|
||||
- INSECURE=true
|
||||
- name: rngd
|
||||
|
@ -2,9 +2,9 @@ kernel:
|
||||
image: "linuxkit/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0 page_poison=1"
|
||||
init:
|
||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
||||
- linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
||||
onboot:
|
||||
- name: sysctl
|
||||
@ -16,7 +16,7 @@ onboot:
|
||||
image: "linuxkit/metadata:31a0b0f5557c6123beaa9c33e3400ae3c03447e0"
|
||||
services:
|
||||
- name: getty
|
||||
image: "linuxkit/getty:886d35fe30c47750e8cfbf2f73016e9d2cc6361a"
|
||||
image: "linuxkit/getty:d0765e0a14733f9454010ac109a7c846a4e67fc5"
|
||||
env:
|
||||
- INSECURE=true
|
||||
- name: rngd
|
||||
|
@ -2,7 +2,7 @@ kernel:
|
||||
image: "linuxkit/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0 console=tty0 page_poison=1"
|
||||
init:
|
||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
||||
- linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b1766e4c4c09f63ac4925a6e4612852a93f7e73b
|
||||
- linuxkit/ca-certificates:eabc5a6e59f05aa91529d80e9a595b85b046f935
|
||||
@ -14,7 +14,7 @@ onboot:
|
||||
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
|
||||
services:
|
||||
- name: getty
|
||||
image: "linuxkit/getty:886d35fe30c47750e8cfbf2f73016e9d2cc6361a"
|
||||
image: "linuxkit/getty:d0765e0a14733f9454010ac109a7c846a4e67fc5"
|
||||
# to make insecure with passwordless root login, uncomment following lines
|
||||
#env:
|
||||
# - INSECURE=true
|
||||
|
@ -2,16 +2,16 @@ kernel:
|
||||
image: "linuxkit/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0 console=tty0 page_poison=1"
|
||||
init:
|
||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
||||
- linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
onboot:
|
||||
- name: dhcpcd
|
||||
image: "linuxkit/dhcpcd:7d2b8aaaf20c24ad7d11a5ea2ea5b4a80dc966f1"
|
||||
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
|
||||
services:
|
||||
- name: getty
|
||||
image: "linuxkit/getty:886d35fe30c47750e8cfbf2f73016e9d2cc6361a"
|
||||
image: "linuxkit/getty:d0765e0a14733f9454010ac109a7c846a4e67fc5"
|
||||
env:
|
||||
- INSECURE=true
|
||||
trust:
|
||||
|
@ -2,12 +2,12 @@ kernel:
|
||||
image: "linuxkit/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0 page_poison=1"
|
||||
init:
|
||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
||||
- linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
services:
|
||||
- name: getty
|
||||
image: "linuxkit/getty:886d35fe30c47750e8cfbf2f73016e9d2cc6361a"
|
||||
image: "linuxkit/getty:d0765e0a14733f9454010ac109a7c846a4e67fc5"
|
||||
env:
|
||||
- INSECURE=true
|
||||
- name: rngd
|
||||
|
@ -2,9 +2,9 @@ kernel:
|
||||
image: "linuxkit/kernel:4.9.x"
|
||||
cmdline: "console=ttyS1 page_poison=1"
|
||||
init:
|
||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
||||
- linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
||||
onboot:
|
||||
- name: sysctl
|
||||
|
@ -4,16 +4,16 @@ kernel:
|
||||
image: "linuxkit/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0 console=tty0 page_poison=1"
|
||||
init:
|
||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
||||
- linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
onboot:
|
||||
- name: dhcpcd
|
||||
image: "linuxkit/dhcpcd:7d2b8aaaf20c24ad7d11a5ea2ea5b4a80dc966f1"
|
||||
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
|
||||
services:
|
||||
- name: getty
|
||||
image: "linuxkit/getty:886d35fe30c47750e8cfbf2f73016e9d2cc6361a"
|
||||
image: "linuxkit/getty:d0765e0a14733f9454010ac109a7c846a4e67fc5"
|
||||
env:
|
||||
- INSECURE=true
|
||||
- name: redis
|
||||
|
@ -2,16 +2,16 @@ kernel:
|
||||
image: "linuxkit/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0 page_poison=1"
|
||||
init:
|
||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
||||
- linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
||||
onboot:
|
||||
- name: sysctl
|
||||
image: "linuxkit/sysctl:3aa6bc663c2849ef239be7d941d3eaf3e6fcc018"
|
||||
services:
|
||||
- name: getty
|
||||
image: "linuxkit/getty:886d35fe30c47750e8cfbf2f73016e9d2cc6361a"
|
||||
image: "linuxkit/getty:d0765e0a14733f9454010ac109a7c846a4e67fc5"
|
||||
env:
|
||||
- INSECURE=true
|
||||
- name: rngd
|
||||
|
@ -2,9 +2,9 @@ kernel:
|
||||
image: "linuxkit/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0 console=tty0 page_poison=1"
|
||||
init:
|
||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
||||
- linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
- linuxkit/ca-certificates:eabc5a6e59f05aa91529d80e9a595b85b046f935
|
||||
onboot:
|
||||
- name: sysctl
|
||||
@ -24,7 +24,7 @@ onboot:
|
||||
command: ["/swap.sh", "--path", "/var/external/swap", "--size", "1G", "--encrypt"]
|
||||
services:
|
||||
- name: getty
|
||||
image: "linuxkit/getty:886d35fe30c47750e8cfbf2f73016e9d2cc6361a"
|
||||
image: "linuxkit/getty:d0765e0a14733f9454010ac109a7c846a4e67fc5"
|
||||
env:
|
||||
- INSECURE=true
|
||||
- name: rngd
|
||||
|
@ -2,16 +2,16 @@ kernel:
|
||||
image: "linuxkit/kernel:4.9.x"
|
||||
cmdline: "console=tty0 page_poison=1"
|
||||
init:
|
||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
||||
- linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
||||
onboot:
|
||||
- name: sysctl
|
||||
image: "linuxkit/sysctl:3aa6bc663c2849ef239be7d941d3eaf3e6fcc018"
|
||||
services:
|
||||
- name: getty
|
||||
image: "linuxkit/getty:886d35fe30c47750e8cfbf2f73016e9d2cc6361a"
|
||||
image: "linuxkit/getty:d0765e0a14733f9454010ac109a7c846a4e67fc5"
|
||||
env:
|
||||
- INSECURE=true
|
||||
- name: rngd
|
||||
|
@ -2,9 +2,9 @@ kernel:
|
||||
image: "linuxkit/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0 page_poison=1"
|
||||
init:
|
||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
||||
- linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
onboot:
|
||||
- name: dhcpcd
|
||||
image: "linuxkit/dhcpcd:7d2b8aaaf20c24ad7d11a5ea2ea5b4a80dc966f1"
|
||||
|
@ -2,9 +2,9 @@ kernel:
|
||||
image: "linuxkit/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0 page_poison=1"
|
||||
init:
|
||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
||||
- linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
onboot:
|
||||
- name: dhcpcd
|
||||
image: "linuxkit/dhcpcd:7d2b8aaaf20c24ad7d11a5ea2ea5b4a80dc966f1"
|
||||
|
@ -2,9 +2,9 @@ kernel:
|
||||
image: "linuxkit/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0 console=tty0 page_poison=1"
|
||||
init:
|
||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
||||
- linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
||||
onboot:
|
||||
- name: sysctl
|
||||
@ -16,7 +16,7 @@ onboot:
|
||||
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
|
||||
services:
|
||||
- name: getty
|
||||
image: "linuxkit/getty:886d35fe30c47750e8cfbf2f73016e9d2cc6361a"
|
||||
image: "linuxkit/getty:d0765e0a14733f9454010ac109a7c846a4e67fc5"
|
||||
env:
|
||||
- INSECURE=true
|
||||
- name: rngd
|
||||
@ -34,7 +34,8 @@ files:
|
||||
contents: |
|
||||
state = "/run/containerd"
|
||||
root = "/var/lib/containerd"
|
||||
snapshotter = "overlay"
|
||||
snapshotter = "io.containerd.snapshotter.v1.overlayfs"
|
||||
differ = "io.containerd.differ.v1.base-diff"
|
||||
subreaper = false
|
||||
|
||||
[grpc]
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM linuxkit/alpine:630ee558e4869672fae230c78364e367b8ea67a9 as alpine
|
||||
FROM linuxkit/alpine:7cf5393e04fe0e26e9fa8f507379cacb64595918 as alpine
|
||||
RUN \
|
||||
apk add \
|
||||
btrfs-progs-dev \
|
||||
@ -9,8 +9,8 @@ RUN \
|
||||
linux-headers \
|
||||
make \
|
||||
&& true
|
||||
ENV GOPATH=/root/go
|
||||
ENV CONTAINERD_COMMIT=bdf9f5f7388e8203e63a74b89800f7f3dd4a7743
|
||||
ENV GOPATH=/go PATH=$PATH:/go/bin
|
||||
ENV CONTAINERD_COMMIT=c215531a8f63a98a69134e804fea4ee6d354bb90
|
||||
RUN mkdir -p $GOPATH/src/github.com/containerd && \
|
||||
cd $GOPATH/src/github.com/containerd && \
|
||||
git clone https://github.com/containerd/containerd.git
|
||||
@ -18,11 +18,16 @@ WORKDIR $GOPATH/src/github.com/containerd/containerd
|
||||
RUN git checkout $CONTAINERD_COMMIT
|
||||
RUN make binaries EXTRA_FLAGS="-buildmode pie" EXTRA_LDFLAGS="-extldflags \\\"-fno-PIC -static\\\""
|
||||
RUN cp bin/containerd bin/ctr bin/containerd-shim bin/dist /usr/bin/
|
||||
|
||||
ADD cmd /go/src/cmd
|
||||
RUN cd /go/src/cmd/service && ./skanky-vendor.sh $GOPATH/src/github.com/containerd/containerd
|
||||
RUN go-compile.sh /go/src/cmd/service
|
||||
|
||||
WORKDIR /
|
||||
COPY . .
|
||||
|
||||
FROM scratch
|
||||
ENTRYPOINT []
|
||||
WORKDIR /
|
||||
COPY --from=alpine /usr/bin/containerd /usr/bin/ctr /usr/bin/dist /usr/bin/containerd-shim /usr/bin/
|
||||
COPY --from=alpine /usr/bin/containerd /usr/bin/ctr /usr/bin/dist /usr/bin/containerd-shim /go/bin/service /usr/bin/
|
||||
COPY --from=alpine /etc/containerd/config.toml /etc/containerd/
|
||||
|
75
pkg/containerd/cmd/service/main.go
Normal file
75
pkg/containerd/cmd/service/main.go
Normal file
@ -0,0 +1,75 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
log "github.com/Sirupsen/logrus"
|
||||
)
|
||||
|
||||
var (
|
||||
defaultLogFormatter = &log.TextFormatter{}
|
||||
)
|
||||
|
||||
// infoFormatter overrides the default format for Info() log events to
|
||||
// provide an easier to read output
|
||||
type infoFormatter struct {
|
||||
}
|
||||
|
||||
func (f *infoFormatter) Format(entry *log.Entry) ([]byte, error) {
|
||||
if entry.Level == log.InfoLevel {
|
||||
return append([]byte(entry.Message), '\n'), nil
|
||||
}
|
||||
return defaultLogFormatter.Format(entry)
|
||||
}
|
||||
|
||||
func main() {
|
||||
flag.Usage = func() {
|
||||
fmt.Printf("USAGE: %s [options] COMMAND\n\n", filepath.Base(os.Args[0]))
|
||||
fmt.Printf("Commands:\n")
|
||||
fmt.Printf(" start Start a service\n")
|
||||
fmt.Printf(" help Print this message\n")
|
||||
fmt.Printf("\n")
|
||||
fmt.Printf("Run '%s COMMAND --help' for more information on the command\n", filepath.Base(os.Args[0]))
|
||||
fmt.Printf("\n")
|
||||
fmt.Printf("Options:\n")
|
||||
flag.PrintDefaults()
|
||||
}
|
||||
flagQuiet := flag.Bool("q", false, "Quiet execution")
|
||||
flagVerbose := flag.Bool("v", false, "Verbose execution")
|
||||
|
||||
// Set up logging
|
||||
log.SetFormatter(new(infoFormatter))
|
||||
log.SetLevel(log.InfoLevel)
|
||||
flag.Parse()
|
||||
if *flagQuiet && *flagVerbose {
|
||||
fmt.Printf("Can't set quiet and verbose flag at the same time\n")
|
||||
os.Exit(1)
|
||||
}
|
||||
if *flagQuiet {
|
||||
log.SetLevel(log.ErrorLevel)
|
||||
}
|
||||
if *flagVerbose {
|
||||
// Switch back to the standard formatter
|
||||
log.SetFormatter(defaultLogFormatter)
|
||||
log.SetLevel(log.DebugLevel)
|
||||
}
|
||||
|
||||
args := flag.Args()
|
||||
if len(args) < 1 {
|
||||
fmt.Printf("Please specify a command.\n\n")
|
||||
flag.Usage()
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
switch args[0] {
|
||||
case "start":
|
||||
start(args[1:])
|
||||
default:
|
||||
fmt.Printf("%q is not valid command.\n\n", args[0])
|
||||
flag.Usage()
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
14
pkg/containerd/cmd/service/skanky-vendor.sh
Executable file
14
pkg/containerd/cmd/service/skanky-vendor.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# We only need the containerd client and its transitive dependencies
|
||||
# and we conveniently have a checkout already. We actually prefer to
|
||||
# reuse containerd's vendoring for consistency anyway.
|
||||
|
||||
set -eu
|
||||
ctrd=$1
|
||||
cp -r $ctrd/vendor/ vendor/
|
||||
# We need containerd itself of course
|
||||
mkdir -p vendor/github.com/containerd
|
||||
cp -r $ctrd vendor/github.com/containerd/containerd
|
||||
# Stop go finding nested vendorings
|
||||
rm -rf vendor/github.com/containerd/containerd/vendor
|
113
pkg/containerd/cmd/service/start.go
Normal file
113
pkg/containerd/cmd/service/start.go
Normal file
@ -0,0 +1,113 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"flag"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
log "github.com/Sirupsen/logrus"
|
||||
"github.com/containerd/containerd"
|
||||
"github.com/containerd/containerd/namespaces"
|
||||
specs "github.com/opencontainers/runtime-spec/specs-go"
|
||||
)
|
||||
|
||||
func start(args []string) {
|
||||
invoked := filepath.Base(os.Args[0])
|
||||
flags := flag.NewFlagSet("start", flag.ExitOnError)
|
||||
flags.Usage = func() {
|
||||
fmt.Printf("USAGE: %s start [service]\n\n", invoked)
|
||||
fmt.Printf("Options:\n")
|
||||
flags.PrintDefaults()
|
||||
}
|
||||
|
||||
sock := flags.String("sock", "/run/containerd/containerd.sock", "Path to containerd socket")
|
||||
|
||||
dumpSpec := flags.String("dump-spec", "", "Dump container spec to file before start")
|
||||
|
||||
if err := flags.Parse(args); err != nil {
|
||||
log.Fatal("Unable to parse args")
|
||||
}
|
||||
args = flags.Args()
|
||||
|
||||
if len(args) != 1 {
|
||||
fmt.Println("Please specify the service")
|
||||
flags.Usage()
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
service := args[0]
|
||||
rootfs := filepath.Join("/containers/services", service, "rootfs")
|
||||
log.Infof("Starting service: %q", service)
|
||||
log := log.WithFields(log.Fields{
|
||||
"service": service,
|
||||
})
|
||||
|
||||
client, err := containerd.New(*sock)
|
||||
if err != nil {
|
||||
log.WithError(err).Fatal("creating containerd client")
|
||||
}
|
||||
|
||||
ctx := namespaces.WithNamespace(context.Background(), "default")
|
||||
|
||||
var spec *specs.Spec
|
||||
specf, err := os.Open(filepath.Join("/containers/services", service, "config.json"))
|
||||
if err != nil {
|
||||
log.WithError(err).Fatal("failed to read service spec")
|
||||
}
|
||||
if err := json.NewDecoder(specf).Decode(&spec); err != nil {
|
||||
log.WithError(err).Fatal("failed to parse service spec")
|
||||
}
|
||||
|
||||
log.Debugf("Rootfs is %s", rootfs)
|
||||
|
||||
spec.Root.Path = rootfs
|
||||
|
||||
if *dumpSpec != "" {
|
||||
d, err := os.Create(*dumpSpec)
|
||||
if err != nil {
|
||||
log.WithError(err).Fatal("failed to open file for spec dump")
|
||||
}
|
||||
enc := json.NewEncoder(d)
|
||||
enc.SetIndent("", " ")
|
||||
if err := enc.Encode(&spec); err != nil {
|
||||
log.WithError(err).Fatal("failed to write spec dump")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ctr, err := client.NewContainer(ctx, service, containerd.WithSpec(spec))
|
||||
if err != nil {
|
||||
log.WithError(err).Fatal("failed to create container")
|
||||
}
|
||||
|
||||
io := func() (*containerd.IO, error) {
|
||||
logfile := filepath.Join("/var/log", service+".log")
|
||||
// We just need this to exist.
|
||||
if err := ioutil.WriteFile(logfile, []byte{}, 0666); err != nil {
|
||||
log.WithError(err).Fatal("failed to touch logfile")
|
||||
}
|
||||
return &containerd.IO{
|
||||
Stdin: "/dev/null",
|
||||
Stdout: logfile,
|
||||
Stderr: logfile,
|
||||
Terminal: false,
|
||||
}, nil
|
||||
}
|
||||
|
||||
task, err := ctr.NewTask(ctx, io)
|
||||
if err != nil {
|
||||
// Don't bother to destroy the container here.
|
||||
log.WithError(err).Fatal("failed to create task")
|
||||
}
|
||||
|
||||
if err := task.Start(ctx); err != nil {
|
||||
// Don't destroy the container here so it can be inspected for debugging.
|
||||
log.WithError(err).Fatal("failed to start task")
|
||||
}
|
||||
|
||||
log.Debugf("Started %s pid %d", ctr.ID(), task.Pid())
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
state = "/run/containerd"
|
||||
root = "/var/lib/containerd"
|
||||
snapshotter = "overlay"
|
||||
snapshotter = "io.containerd.snapshotter.v1.overlayfs"
|
||||
differ = "io.containerd.differ.v1.base-diff"
|
||||
subreaper = false
|
||||
|
||||
[grpc]
|
||||
|
@ -28,4 +28,4 @@ COPY --from=mirror /out/ /
|
||||
COPY usr/ /usr/
|
||||
COPY etc/ /etc/
|
||||
CMD ["/usr/bin/rungetty.sh"]
|
||||
LABEL org.mobyproject.config='{"pid": "host", "net":"host", "binds": ["/run:/run", "/etc:/hostroot/etc","/tmp/ctr:/tmp/ctr", "/usr/bin/ctr:/usr/bin/ctr", "/usr/bin/runc:/usr/bin/runc", "/usr/bin/dist:/usr/bin/dist", "/var:/var","/containers:/containers","/dev:/dev","/sys:/sys"], "capabilities": ["all"]}'
|
||||
LABEL org.mobyproject.config='{"pid": "host", "net":"host", "binds": ["/run:/run", "/etc:/hostroot/etc", "/usr/bin/ctr:/usr/bin/ctr", "/usr/bin/runc:/usr/bin/runc", "/usr/bin/dist:/usr/bin/dist", "/var:/var","/containers:/containers","/dev:/dev","/sys:/sys"], "capabilities": ["all"]}'
|
||||
|
@ -34,13 +34,8 @@ if [ -d /containers/services ]
|
||||
then
|
||||
for f in $(find /containers/services -mindepth 1 -maxdepth 1 | sort)
|
||||
do
|
||||
base="$(basename $f)"
|
||||
/bin/mount --bind "$f/rootfs" "$f/rootfs"
|
||||
mount -o remount,rw "$f/rootfs"
|
||||
log="/var/log/$base.log"
|
||||
ctr run --runtime-config "$f/config.json" --rootfs "$f/rootfs" --id "$(basename $f)" </dev/null 2>$log >$log &
|
||||
printf " - $base\n"
|
||||
service start "$(basename $f)"
|
||||
done
|
||||
fi
|
||||
|
||||
wait
|
||||
|
@ -4,7 +4,7 @@ kernel:
|
||||
init:
|
||||
- linuxkit/init:1b8a7e394d2ec2f1fdb4d67645829d1b5bdca037
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
||||
onboot:
|
||||
- name: sysctl
|
||||
|
@ -4,7 +4,7 @@ kernel:
|
||||
init:
|
||||
- linuxkit/init:b3740303f3d1e5689a84c87b7dfb48fd2a40a192
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
||||
- linuxkit/ima-utils:dfeb3896fd29308b80ff9ba7fe5b8b767e40ca29
|
||||
onboot:
|
||||
|
@ -2,9 +2,9 @@ kernel:
|
||||
image: "linuxkit/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0 console=tty0 page_poison=1"
|
||||
init:
|
||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
||||
- linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
||||
onboot:
|
||||
- name: sysctl
|
||||
@ -26,7 +26,7 @@ onboot:
|
||||
- /var:/var:rshared,rbind
|
||||
services:
|
||||
- name: getty
|
||||
image: "linuxkit/getty:886d35fe30c47750e8cfbf2f73016e9d2cc6361a"
|
||||
image: "linuxkit/getty:d0765e0a14733f9454010ac109a7c846a4e67fc5"
|
||||
env:
|
||||
- INSECURE=true
|
||||
- name: rngd
|
||||
|
@ -2,9 +2,9 @@ kernel:
|
||||
image: "linuxkit/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0 console=tty0 page_poison=1"
|
||||
init:
|
||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
||||
- linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
||||
onboot:
|
||||
- name: sysctl
|
||||
@ -26,7 +26,7 @@ onboot:
|
||||
- /var:/var:rshared,rbind
|
||||
services:
|
||||
- name: getty
|
||||
image: "linuxkit/getty:886d35fe30c47750e8cfbf2f73016e9d2cc6361a"
|
||||
image: "linuxkit/getty:d0765e0a14733f9454010ac109a7c846a4e67fc5"
|
||||
env:
|
||||
- INSECURE=true
|
||||
- name: rngd
|
||||
|
@ -4,7 +4,7 @@ kernel:
|
||||
init:
|
||||
- linuxkit/init:1b8a7e394d2ec2f1fdb4d67645829d1b5bdca037 # with runc, logwrite, startmemlogd
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
||||
- linuxkit/memlogd:9b5834189f598f43c507f6938077113906f51012
|
||||
onboot:
|
||||
|
@ -4,7 +4,7 @@ kernel:
|
||||
init:
|
||||
- linuxkit/init:2599bcd5013ce5962aa155ee8929c26160de13bd
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
onboot:
|
||||
- name: sysctl
|
||||
image: linuxkit/sysctl:3aa6bc663c2849ef239be7d941d3eaf3e6fcc018
|
||||
@ -30,7 +30,7 @@ services:
|
||||
- name: sshd
|
||||
image: "linuxkit/sshd:abc1f5e096982ebc3fb61c506aed3ac9c2ae4d55"
|
||||
- name: getty
|
||||
image: "linuxkit/getty:886d35fe30c47750e8cfbf2f73016e9d2cc6361a"
|
||||
image: "linuxkit/getty:d0765e0a14733f9454010ac109a7c846a4e67fc5"
|
||||
env:
|
||||
- INSECURE=true
|
||||
files:
|
||||
|
@ -4,7 +4,7 @@ kernel:
|
||||
init:
|
||||
- linuxkit/init:2599bcd5013ce5962aa155ee8929c26160de13bd
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
||||
onboot:
|
||||
- name: sysctl
|
||||
@ -16,7 +16,7 @@ onboot:
|
||||
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
|
||||
services:
|
||||
- name: getty
|
||||
image: "linuxkit/getty:886d35fe30c47750e8cfbf2f73016e9d2cc6361a"
|
||||
image: "linuxkit/getty:d0765e0a14733f9454010ac109a7c846a4e67fc5"
|
||||
env:
|
||||
- INSECURE=true
|
||||
- name: rngd
|
||||
@ -34,7 +34,8 @@ files:
|
||||
contents: |
|
||||
state = "/run/containerd"
|
||||
root = "/var/lib/containerd"
|
||||
snapshotter = "overlay"
|
||||
snapshotter = "io.containerd.snapshotter.v1.overlayfs"
|
||||
differ = "io.containerd.differ.v1.base-diff"
|
||||
subreaper = false
|
||||
|
||||
[grpc]
|
||||
|
@ -4,7 +4,7 @@ kernel:
|
||||
init:
|
||||
- linuxkit/init:1b8a7e394d2ec2f1fdb4d67645829d1b5bdca037
|
||||
- linuxkit/runc:2649198589ef0020d99f613adaeda45ce0093a38
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
||||
onboot:
|
||||
- name: sysctl
|
||||
|
@ -2,9 +2,9 @@ kernel:
|
||||
image: "linuxkit/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0"
|
||||
init:
|
||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
||||
- linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
onboot:
|
||||
- name: dhcpcd
|
||||
image: "linuxkit/dhcpcd:7d2b8aaaf20c24ad7d11a5ea2ea5b4a80dc966f1"
|
||||
|
@ -2,9 +2,9 @@ kernel:
|
||||
image: "linuxkit/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0"
|
||||
init:
|
||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
||||
- linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
onboot:
|
||||
- name: poweroff
|
||||
image: "linuxkit/poweroff:7404cf2295df89ccfa2dda41997a28307a90cf28"
|
||||
|
@ -2,9 +2,9 @@ kernel:
|
||||
image: "linuxkit/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0"
|
||||
init:
|
||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
||||
- linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
onboot:
|
||||
- name: poweroff
|
||||
image: "linuxkit/poweroff:7404cf2295df89ccfa2dda41997a28307a90cf28"
|
||||
|
@ -2,9 +2,9 @@ kernel:
|
||||
image: "linuxkit/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0"
|
||||
init:
|
||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
||||
- linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
onboot:
|
||||
- name: poweroff
|
||||
image: "linuxkit/poweroff:7404cf2295df89ccfa2dda41997a28307a90cf28"
|
||||
|
@ -2,9 +2,9 @@ kernel:
|
||||
image: "linuxkit/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0"
|
||||
init:
|
||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
||||
- linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
onboot:
|
||||
- name: poweroff
|
||||
image: "linuxkit/poweroff:7404cf2295df89ccfa2dda41997a28307a90cf28"
|
||||
|
@ -2,9 +2,9 @@ kernel:
|
||||
image: "linuxkit/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0"
|
||||
init:
|
||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
||||
- linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
onboot:
|
||||
- name: poweroff
|
||||
image: "linuxkit/poweroff:7404cf2295df89ccfa2dda41997a28307a90cf28"
|
||||
|
@ -2,9 +2,9 @@ kernel:
|
||||
image: "linuxkit/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0"
|
||||
init:
|
||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
||||
- linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
onboot:
|
||||
- name: poweroff
|
||||
image: "linuxkit/poweroff:7404cf2295df89ccfa2dda41997a28307a90cf28"
|
||||
|
@ -2,9 +2,9 @@ kernel:
|
||||
image: "linuxkit/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0"
|
||||
init:
|
||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
||||
- linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
onboot:
|
||||
- name: poweroff
|
||||
image: "linuxkit/poweroff:7404cf2295df89ccfa2dda41997a28307a90cf28"
|
||||
|
@ -2,9 +2,9 @@ kernel:
|
||||
image: "linuxkit/kernel:4.4.x"
|
||||
cmdline: "console=ttyS0"
|
||||
init:
|
||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
||||
- linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
onboot:
|
||||
- name: check-kernel-config
|
||||
image: "linuxkit/test-kernel-config:2acaa564c1801dd2ae1546c70c472dc58ac030a1"
|
||||
|
@ -2,9 +2,9 @@ kernel:
|
||||
image: "linuxkit/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0"
|
||||
init:
|
||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
||||
- linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
onboot:
|
||||
- name: check-kernel-config
|
||||
image: "linuxkit/test-kernel-config:2acaa564c1801dd2ae1546c70c472dc58ac030a1"
|
||||
|
@ -2,9 +2,9 @@ kernel:
|
||||
image: "linuxkit/kernel:4.11.x"
|
||||
cmdline: "console=ttyS0"
|
||||
init:
|
||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
||||
- linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
onboot:
|
||||
- name: check-kernel-config
|
||||
image: "linuxkit/test-kernel-config:2acaa564c1801dd2ae1546c70c472dc58ac030a1"
|
||||
|
@ -2,9 +2,9 @@ kernel:
|
||||
image: "linuxkit/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0"
|
||||
init:
|
||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
||||
- linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
onboot:
|
||||
- name: check
|
||||
image: "kmod-test"
|
||||
|
@ -2,9 +2,9 @@ kernel:
|
||||
image: "linuxkit/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0"
|
||||
init:
|
||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
||||
- linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
||||
onboot:
|
||||
- name: sysctl
|
||||
|
@ -2,9 +2,9 @@ kernel:
|
||||
image: "linuxkit/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0 page_poison=1"
|
||||
init:
|
||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
||||
- linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
onboot:
|
||||
- name: test
|
||||
image: "alpine:3.6"
|
||||
|
@ -2,9 +2,9 @@ kernel:
|
||||
image: "linuxkit/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0 page_poison=1"
|
||||
init:
|
||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
||||
- linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
onboot:
|
||||
- name: binfmt
|
||||
image: "linuxkit/binfmt:8ac5535f57f0c6f5fe88317b9d22a7677093c765"
|
||||
|
@ -2,9 +2,9 @@ kernel:
|
||||
image: "linuxkit/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0 page_poison=1"
|
||||
init:
|
||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
||||
- linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
||||
onboot:
|
||||
- name: test
|
||||
|
@ -2,9 +2,9 @@ kernel:
|
||||
image: "linuxkit/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0 page_poison=1"
|
||||
init:
|
||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
||||
- linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
onboot:
|
||||
- name: dhcpcd
|
||||
image: "linuxkit/dhcpcd:7d2b8aaaf20c24ad7d11a5ea2ea5b4a80dc966f1"
|
||||
|
@ -2,9 +2,9 @@ kernel:
|
||||
image: "linuxkit/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0"
|
||||
init:
|
||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
||||
- linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
onboot:
|
||||
- name: mkimage
|
||||
image: "linuxkit/mkimage:f4bf0c24261f7d120c8674892805ab3054eb8ac3"
|
||||
|
@ -2,9 +2,9 @@ kernel:
|
||||
image: "linuxkit/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0"
|
||||
init:
|
||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
||||
- linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
onboot:
|
||||
- name: poweroff
|
||||
image: "linuxkit/poweroff:7404cf2295df89ccfa2dda41997a28307a90cf28"
|
||||
|
@ -2,9 +2,9 @@ kernel:
|
||||
image: "linuxkit/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0 page_poison=1"
|
||||
init:
|
||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
||||
- linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
onboot:
|
||||
- name: sysctl
|
||||
image: "linuxkit/sysctl:3aa6bc663c2849ef239be7d941d3eaf3e6fcc018"
|
||||
|
@ -2,9 +2,9 @@ kernel:
|
||||
image: "linuxkit/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0"
|
||||
init:
|
||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
||||
- linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
onboot:
|
||||
- name: ltp
|
||||
image: "linuxkit/test-ltp:6df23ac196332cafb9c0f8e32f328e22d612267d"
|
||||
|
@ -4,9 +4,9 @@ kernel:
|
||||
image: "linuxkit/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0"
|
||||
init:
|
||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
||||
- linuxkit/init:17693d233dd009b2a3a8d23673cb85969e1dce80
|
||||
- linuxkit/runc:2649198589ef0020d99f613adaeda45ce0093a38
|
||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
||||
- linuxkit/containerd:04880f344709830aa4c938baa765764e644fc973
|
||||
onboot:
|
||||
- name: dhcpcd
|
||||
image: "linuxkit/dhcpcd:7d2b8aaaf20c24ad7d11a5ea2ea5b4a80dc966f1"
|
||||
|
Loading…
Reference in New Issue
Block a user