mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-21 10:09:07 +00:00
init: replace ctr with a custom client using the containerd client library
Currently it supports only `service start <SERVICE>`, but it could grow e.g. `stop`, `exec` etc in the future (although you can still use `ctr` for those). In order to be able to use go-compile.sh the containerd build needs to move from /root/go to /go as the GOPATH. The vendoring situation is not ideal, but since this tool wants to be an exact match for the containerd it seems tollerable to reuse its vendoring. Signed-off-by: Ian Campbell <ian.campbell@docker.com>
This commit is contained in:
parent
f7b2a739ee
commit
5833d1b6bc
@ -2,9 +2,9 @@ kernel:
|
|||||||
image: "linuxkit/kernel:4.9.x"
|
image: "linuxkit/kernel:4.9.x"
|
||||||
cmdline: "console=ttyS0 page_poison=1"
|
cmdline: "console=ttyS0 page_poison=1"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
- linuxkit/init:d04cb1ef203f3d3b320e2a7d0ded127d21cabd74
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
||||||
onboot:
|
onboot:
|
||||||
- name: sysctl
|
- name: sysctl
|
||||||
|
@ -2,7 +2,7 @@ kernel:
|
|||||||
image: "linuxkit/kernel:4.9.x"
|
image: "linuxkit/kernel:4.9.x"
|
||||||
cmdline: "console=ttyS0 page_poison=1"
|
cmdline: "console=ttyS0 page_poison=1"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
- linuxkit/init:d04cb1ef203f3d3b320e2a7d0ded127d21cabd74
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b1766e4c4c09f63ac4925a6e4612852a93f7e73b
|
- linuxkit/containerd:b1766e4c4c09f63ac4925a6e4612852a93f7e73b
|
||||||
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
||||||
|
@ -2,9 +2,9 @@ kernel:
|
|||||||
image: "linuxkit/kernel:4.9.x"
|
image: "linuxkit/kernel:4.9.x"
|
||||||
cmdline: "console=ttyS0 console=tty0 page_poison=1"
|
cmdline: "console=ttyS0 console=tty0 page_poison=1"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
- linuxkit/init:d04cb1ef203f3d3b320e2a7d0ded127d21cabd74
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
||||||
onboot:
|
onboot:
|
||||||
- name: sysctl
|
- name: sysctl
|
||||||
|
@ -2,9 +2,9 @@ kernel:
|
|||||||
image: "linuxkit/kernel:4.9.x"
|
image: "linuxkit/kernel:4.9.x"
|
||||||
cmdline: "console=ttyS0 page_poison=1"
|
cmdline: "console=ttyS0 page_poison=1"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
- linuxkit/init:d04cb1ef203f3d3b320e2a7d0ded127d21cabd74
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
||||||
onboot:
|
onboot:
|
||||||
- name: sysctl
|
- name: sysctl
|
||||||
|
@ -2,7 +2,7 @@ kernel:
|
|||||||
image: "linuxkit/kernel:4.9.x"
|
image: "linuxkit/kernel:4.9.x"
|
||||||
cmdline: "console=ttyS0 console=tty0 page_poison=1"
|
cmdline: "console=ttyS0 console=tty0 page_poison=1"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
- linuxkit/init:d04cb1ef203f3d3b320e2a7d0ded127d21cabd74
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b1766e4c4c09f63ac4925a6e4612852a93f7e73b
|
- linuxkit/containerd:b1766e4c4c09f63ac4925a6e4612852a93f7e73b
|
||||||
- linuxkit/ca-certificates:eabc5a6e59f05aa91529d80e9a595b85b046f935
|
- linuxkit/ca-certificates:eabc5a6e59f05aa91529d80e9a595b85b046f935
|
||||||
|
@ -2,9 +2,9 @@ kernel:
|
|||||||
image: "linuxkit/kernel:4.9.x"
|
image: "linuxkit/kernel:4.9.x"
|
||||||
cmdline: "console=ttyS0 console=tty0 page_poison=1"
|
cmdline: "console=ttyS0 console=tty0 page_poison=1"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
- linuxkit/init:d04cb1ef203f3d3b320e2a7d0ded127d21cabd74
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
onboot:
|
onboot:
|
||||||
- name: dhcpcd
|
- name: dhcpcd
|
||||||
image: "linuxkit/dhcpcd:7d2b8aaaf20c24ad7d11a5ea2ea5b4a80dc966f1"
|
image: "linuxkit/dhcpcd:7d2b8aaaf20c24ad7d11a5ea2ea5b4a80dc966f1"
|
||||||
|
@ -2,9 +2,9 @@ kernel:
|
|||||||
image: "linuxkit/kernel:4.9.x"
|
image: "linuxkit/kernel:4.9.x"
|
||||||
cmdline: "console=ttyS0 page_poison=1"
|
cmdline: "console=ttyS0 page_poison=1"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
- linuxkit/init:d04cb1ef203f3d3b320e2a7d0ded127d21cabd74
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
services:
|
services:
|
||||||
- name: getty
|
- name: getty
|
||||||
image: "linuxkit/getty:d0765e0a14733f9454010ac109a7c846a4e67fc5"
|
image: "linuxkit/getty:d0765e0a14733f9454010ac109a7c846a4e67fc5"
|
||||||
|
@ -2,9 +2,9 @@ kernel:
|
|||||||
image: "linuxkit/kernel:4.9.x"
|
image: "linuxkit/kernel:4.9.x"
|
||||||
cmdline: "console=ttyS1 page_poison=1"
|
cmdline: "console=ttyS1 page_poison=1"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
- linuxkit/init:d04cb1ef203f3d3b320e2a7d0ded127d21cabd74
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
||||||
onboot:
|
onboot:
|
||||||
- name: sysctl
|
- name: sysctl
|
||||||
|
@ -4,9 +4,9 @@ kernel:
|
|||||||
image: "linuxkit/kernel:4.9.x"
|
image: "linuxkit/kernel:4.9.x"
|
||||||
cmdline: "console=ttyS0 console=tty0 page_poison=1"
|
cmdline: "console=ttyS0 console=tty0 page_poison=1"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
- linuxkit/init:d04cb1ef203f3d3b320e2a7d0ded127d21cabd74
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
onboot:
|
onboot:
|
||||||
- name: dhcpcd
|
- name: dhcpcd
|
||||||
image: "linuxkit/dhcpcd:7d2b8aaaf20c24ad7d11a5ea2ea5b4a80dc966f1"
|
image: "linuxkit/dhcpcd:7d2b8aaaf20c24ad7d11a5ea2ea5b4a80dc966f1"
|
||||||
|
@ -2,9 +2,9 @@ kernel:
|
|||||||
image: "linuxkit/kernel:4.9.x"
|
image: "linuxkit/kernel:4.9.x"
|
||||||
cmdline: "console=ttyS0 page_poison=1"
|
cmdline: "console=ttyS0 page_poison=1"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
- linuxkit/init:d04cb1ef203f3d3b320e2a7d0ded127d21cabd74
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
||||||
onboot:
|
onboot:
|
||||||
- name: sysctl
|
- name: sysctl
|
||||||
|
@ -2,9 +2,9 @@ kernel:
|
|||||||
image: "linuxkit/kernel:4.9.x"
|
image: "linuxkit/kernel:4.9.x"
|
||||||
cmdline: "console=ttyS0 console=tty0 page_poison=1"
|
cmdline: "console=ttyS0 console=tty0 page_poison=1"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
- linuxkit/init:d04cb1ef203f3d3b320e2a7d0ded127d21cabd74
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
- linuxkit/ca-certificates:eabc5a6e59f05aa91529d80e9a595b85b046f935
|
- linuxkit/ca-certificates:eabc5a6e59f05aa91529d80e9a595b85b046f935
|
||||||
onboot:
|
onboot:
|
||||||
- name: sysctl
|
- name: sysctl
|
||||||
|
@ -2,9 +2,9 @@ kernel:
|
|||||||
image: "linuxkit/kernel:4.9.x"
|
image: "linuxkit/kernel:4.9.x"
|
||||||
cmdline: "console=tty0 page_poison=1"
|
cmdline: "console=tty0 page_poison=1"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
- linuxkit/init:d04cb1ef203f3d3b320e2a7d0ded127d21cabd74
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
||||||
onboot:
|
onboot:
|
||||||
- name: sysctl
|
- name: sysctl
|
||||||
|
@ -2,9 +2,9 @@ kernel:
|
|||||||
image: "linuxkit/kernel:4.9.x"
|
image: "linuxkit/kernel:4.9.x"
|
||||||
cmdline: "console=ttyS0 page_poison=1"
|
cmdline: "console=ttyS0 page_poison=1"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
- linuxkit/init:d04cb1ef203f3d3b320e2a7d0ded127d21cabd74
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
onboot:
|
onboot:
|
||||||
- name: dhcpcd
|
- name: dhcpcd
|
||||||
image: "linuxkit/dhcpcd:7d2b8aaaf20c24ad7d11a5ea2ea5b4a80dc966f1"
|
image: "linuxkit/dhcpcd:7d2b8aaaf20c24ad7d11a5ea2ea5b4a80dc966f1"
|
||||||
|
@ -2,9 +2,9 @@ kernel:
|
|||||||
image: "linuxkit/kernel:4.9.x"
|
image: "linuxkit/kernel:4.9.x"
|
||||||
cmdline: "console=ttyS0 page_poison=1"
|
cmdline: "console=ttyS0 page_poison=1"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
- linuxkit/init:d04cb1ef203f3d3b320e2a7d0ded127d21cabd74
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
onboot:
|
onboot:
|
||||||
- name: dhcpcd
|
- name: dhcpcd
|
||||||
image: "linuxkit/dhcpcd:7d2b8aaaf20c24ad7d11a5ea2ea5b4a80dc966f1"
|
image: "linuxkit/dhcpcd:7d2b8aaaf20c24ad7d11a5ea2ea5b4a80dc966f1"
|
||||||
|
@ -2,9 +2,9 @@ kernel:
|
|||||||
image: "linuxkit/kernel:4.9.x"
|
image: "linuxkit/kernel:4.9.x"
|
||||||
cmdline: "console=ttyS0 console=tty0 page_poison=1"
|
cmdline: "console=ttyS0 console=tty0 page_poison=1"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
- linuxkit/init:d04cb1ef203f3d3b320e2a7d0ded127d21cabd74
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
||||||
onboot:
|
onboot:
|
||||||
- name: sysctl
|
- name: sysctl
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM linuxkit/alpine:630ee558e4869672fae230c78364e367b8ea67a9 as alpine
|
FROM linuxkit/alpine:7cf5393e04fe0e26e9fa8f507379cacb64595918 as alpine
|
||||||
RUN \
|
RUN \
|
||||||
apk add \
|
apk add \
|
||||||
btrfs-progs-dev \
|
btrfs-progs-dev \
|
||||||
@ -9,7 +9,7 @@ RUN \
|
|||||||
linux-headers \
|
linux-headers \
|
||||||
make \
|
make \
|
||||||
&& true
|
&& true
|
||||||
ENV GOPATH=/root/go
|
ENV GOPATH=/go PATH=$PATH:/go/bin
|
||||||
ENV CONTAINERD_COMMIT=bdf9f5f7388e8203e63a74b89800f7f3dd4a7743
|
ENV CONTAINERD_COMMIT=bdf9f5f7388e8203e63a74b89800f7f3dd4a7743
|
||||||
RUN mkdir -p $GOPATH/src/github.com/containerd && \
|
RUN mkdir -p $GOPATH/src/github.com/containerd && \
|
||||||
cd $GOPATH/src/github.com/containerd && \
|
cd $GOPATH/src/github.com/containerd && \
|
||||||
@ -18,11 +18,16 @@ WORKDIR $GOPATH/src/github.com/containerd/containerd
|
|||||||
RUN git checkout $CONTAINERD_COMMIT
|
RUN git checkout $CONTAINERD_COMMIT
|
||||||
RUN make binaries EXTRA_FLAGS="-buildmode pie" EXTRA_LDFLAGS="-extldflags \\\"-fno-PIC -static\\\""
|
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/
|
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 /
|
WORKDIR /
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
FROM scratch
|
FROM scratch
|
||||||
ENTRYPOINT []
|
ENTRYPOINT []
|
||||||
WORKDIR /
|
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/
|
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())
|
||||||
|
}
|
@ -34,12 +34,9 @@ if [ -d /containers/services ]
|
|||||||
then
|
then
|
||||||
for f in $(find /containers/services -mindepth 1 -maxdepth 1 | sort)
|
for f in $(find /containers/services -mindepth 1 -maxdepth 1 | sort)
|
||||||
do
|
do
|
||||||
base="$(basename $f)"
|
|
||||||
/bin/mount --bind "$f/rootfs" "$f/rootfs"
|
/bin/mount --bind "$f/rootfs" "$f/rootfs"
|
||||||
mount -o remount,rw "$f/rootfs"
|
mount -o remount,rw "$f/rootfs"
|
||||||
log="/var/log/$base.log"
|
service start "$(basename $f)"
|
||||||
ctr run --runtime-config "$f/config.json" --rootfs "$f/rootfs" --id "$(basename $f)" </dev/null 2>$log >$log &
|
|
||||||
printf " - $base\n"
|
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ kernel:
|
|||||||
init:
|
init:
|
||||||
- linuxkit/init:1b8a7e394d2ec2f1fdb4d67645829d1b5bdca037
|
- linuxkit/init:1b8a7e394d2ec2f1fdb4d67645829d1b5bdca037
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
||||||
onboot:
|
onboot:
|
||||||
- name: sysctl
|
- name: sysctl
|
||||||
|
@ -4,7 +4,7 @@ kernel:
|
|||||||
init:
|
init:
|
||||||
- linuxkit/init:b3740303f3d1e5689a84c87b7dfb48fd2a40a192
|
- linuxkit/init:b3740303f3d1e5689a84c87b7dfb48fd2a40a192
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
||||||
- linuxkit/ima-utils:dfeb3896fd29308b80ff9ba7fe5b8b767e40ca29
|
- linuxkit/ima-utils:dfeb3896fd29308b80ff9ba7fe5b8b767e40ca29
|
||||||
onboot:
|
onboot:
|
||||||
|
@ -2,9 +2,9 @@ kernel:
|
|||||||
image: "linuxkit/kernel:4.9.x"
|
image: "linuxkit/kernel:4.9.x"
|
||||||
cmdline: "console=ttyS0 console=tty0 page_poison=1"
|
cmdline: "console=ttyS0 console=tty0 page_poison=1"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
- linuxkit/init:d04cb1ef203f3d3b320e2a7d0ded127d21cabd74
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
||||||
onboot:
|
onboot:
|
||||||
- name: sysctl
|
- name: sysctl
|
||||||
|
@ -2,9 +2,9 @@ kernel:
|
|||||||
image: "linuxkit/kernel:4.9.x"
|
image: "linuxkit/kernel:4.9.x"
|
||||||
cmdline: "console=ttyS0 console=tty0 page_poison=1"
|
cmdline: "console=ttyS0 console=tty0 page_poison=1"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
- linuxkit/init:d04cb1ef203f3d3b320e2a7d0ded127d21cabd74
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
||||||
onboot:
|
onboot:
|
||||||
- name: sysctl
|
- name: sysctl
|
||||||
|
@ -4,7 +4,7 @@ kernel:
|
|||||||
init:
|
init:
|
||||||
- linuxkit/init:1b8a7e394d2ec2f1fdb4d67645829d1b5bdca037 # with runc, logwrite, startmemlogd
|
- linuxkit/init:1b8a7e394d2ec2f1fdb4d67645829d1b5bdca037 # with runc, logwrite, startmemlogd
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
||||||
- linuxkit/memlogd:9b5834189f598f43c507f6938077113906f51012
|
- linuxkit/memlogd:9b5834189f598f43c507f6938077113906f51012
|
||||||
onboot:
|
onboot:
|
||||||
|
@ -4,7 +4,7 @@ kernel:
|
|||||||
init:
|
init:
|
||||||
- linuxkit/init:2599bcd5013ce5962aa155ee8929c26160de13bd
|
- linuxkit/init:2599bcd5013ce5962aa155ee8929c26160de13bd
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
onboot:
|
onboot:
|
||||||
- name: sysctl
|
- name: sysctl
|
||||||
image: linuxkit/sysctl:3aa6bc663c2849ef239be7d941d3eaf3e6fcc018
|
image: linuxkit/sysctl:3aa6bc663c2849ef239be7d941d3eaf3e6fcc018
|
||||||
|
@ -4,7 +4,7 @@ kernel:
|
|||||||
init:
|
init:
|
||||||
- linuxkit/init:2599bcd5013ce5962aa155ee8929c26160de13bd
|
- linuxkit/init:2599bcd5013ce5962aa155ee8929c26160de13bd
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
||||||
onboot:
|
onboot:
|
||||||
- name: sysctl
|
- name: sysctl
|
||||||
|
@ -4,7 +4,7 @@ kernel:
|
|||||||
init:
|
init:
|
||||||
- linuxkit/init:1b8a7e394d2ec2f1fdb4d67645829d1b5bdca037
|
- linuxkit/init:1b8a7e394d2ec2f1fdb4d67645829d1b5bdca037
|
||||||
- linuxkit/runc:2649198589ef0020d99f613adaeda45ce0093a38
|
- linuxkit/runc:2649198589ef0020d99f613adaeda45ce0093a38
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
||||||
onboot:
|
onboot:
|
||||||
- name: sysctl
|
- name: sysctl
|
||||||
|
@ -2,9 +2,9 @@ kernel:
|
|||||||
image: "linuxkit/kernel:4.9.x"
|
image: "linuxkit/kernel:4.9.x"
|
||||||
cmdline: "console=ttyS0"
|
cmdline: "console=ttyS0"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
- linuxkit/init:d04cb1ef203f3d3b320e2a7d0ded127d21cabd74
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
onboot:
|
onboot:
|
||||||
- name: dhcpcd
|
- name: dhcpcd
|
||||||
image: "linuxkit/dhcpcd:7d2b8aaaf20c24ad7d11a5ea2ea5b4a80dc966f1"
|
image: "linuxkit/dhcpcd:7d2b8aaaf20c24ad7d11a5ea2ea5b4a80dc966f1"
|
||||||
|
@ -2,9 +2,9 @@ kernel:
|
|||||||
image: "linuxkit/kernel:4.9.x"
|
image: "linuxkit/kernel:4.9.x"
|
||||||
cmdline: "console=ttyS0"
|
cmdline: "console=ttyS0"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
- linuxkit/init:d04cb1ef203f3d3b320e2a7d0ded127d21cabd74
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
onboot:
|
onboot:
|
||||||
- name: poweroff
|
- name: poweroff
|
||||||
image: "linuxkit/poweroff:7404cf2295df89ccfa2dda41997a28307a90cf28"
|
image: "linuxkit/poweroff:7404cf2295df89ccfa2dda41997a28307a90cf28"
|
||||||
|
@ -2,9 +2,9 @@ kernel:
|
|||||||
image: "linuxkit/kernel:4.9.x"
|
image: "linuxkit/kernel:4.9.x"
|
||||||
cmdline: "console=ttyS0"
|
cmdline: "console=ttyS0"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
- linuxkit/init:d04cb1ef203f3d3b320e2a7d0ded127d21cabd74
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
onboot:
|
onboot:
|
||||||
- name: poweroff
|
- name: poweroff
|
||||||
image: "linuxkit/poweroff:7404cf2295df89ccfa2dda41997a28307a90cf28"
|
image: "linuxkit/poweroff:7404cf2295df89ccfa2dda41997a28307a90cf28"
|
||||||
|
@ -2,9 +2,9 @@ kernel:
|
|||||||
image: "linuxkit/kernel:4.9.x"
|
image: "linuxkit/kernel:4.9.x"
|
||||||
cmdline: "console=ttyS0"
|
cmdline: "console=ttyS0"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
- linuxkit/init:d04cb1ef203f3d3b320e2a7d0ded127d21cabd74
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
onboot:
|
onboot:
|
||||||
- name: poweroff
|
- name: poweroff
|
||||||
image: "linuxkit/poweroff:7404cf2295df89ccfa2dda41997a28307a90cf28"
|
image: "linuxkit/poweroff:7404cf2295df89ccfa2dda41997a28307a90cf28"
|
||||||
|
@ -2,9 +2,9 @@ kernel:
|
|||||||
image: "linuxkit/kernel:4.9.x"
|
image: "linuxkit/kernel:4.9.x"
|
||||||
cmdline: "console=ttyS0"
|
cmdline: "console=ttyS0"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
- linuxkit/init:d04cb1ef203f3d3b320e2a7d0ded127d21cabd74
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
onboot:
|
onboot:
|
||||||
- name: poweroff
|
- name: poweroff
|
||||||
image: "linuxkit/poweroff:7404cf2295df89ccfa2dda41997a28307a90cf28"
|
image: "linuxkit/poweroff:7404cf2295df89ccfa2dda41997a28307a90cf28"
|
||||||
|
@ -2,9 +2,9 @@ kernel:
|
|||||||
image: "linuxkit/kernel:4.9.x"
|
image: "linuxkit/kernel:4.9.x"
|
||||||
cmdline: "console=ttyS0"
|
cmdline: "console=ttyS0"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
- linuxkit/init:d04cb1ef203f3d3b320e2a7d0ded127d21cabd74
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
onboot:
|
onboot:
|
||||||
- name: poweroff
|
- name: poweroff
|
||||||
image: "linuxkit/poweroff:7404cf2295df89ccfa2dda41997a28307a90cf28"
|
image: "linuxkit/poweroff:7404cf2295df89ccfa2dda41997a28307a90cf28"
|
||||||
|
@ -2,9 +2,9 @@ kernel:
|
|||||||
image: "linuxkit/kernel:4.9.x"
|
image: "linuxkit/kernel:4.9.x"
|
||||||
cmdline: "console=ttyS0"
|
cmdline: "console=ttyS0"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
- linuxkit/init:d04cb1ef203f3d3b320e2a7d0ded127d21cabd74
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
onboot:
|
onboot:
|
||||||
- name: poweroff
|
- name: poweroff
|
||||||
image: "linuxkit/poweroff:7404cf2295df89ccfa2dda41997a28307a90cf28"
|
image: "linuxkit/poweroff:7404cf2295df89ccfa2dda41997a28307a90cf28"
|
||||||
|
@ -2,9 +2,9 @@ kernel:
|
|||||||
image: "linuxkit/kernel:4.9.x"
|
image: "linuxkit/kernel:4.9.x"
|
||||||
cmdline: "console=ttyS0"
|
cmdline: "console=ttyS0"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
- linuxkit/init:d04cb1ef203f3d3b320e2a7d0ded127d21cabd74
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
onboot:
|
onboot:
|
||||||
- name: poweroff
|
- name: poweroff
|
||||||
image: "linuxkit/poweroff:7404cf2295df89ccfa2dda41997a28307a90cf28"
|
image: "linuxkit/poweroff:7404cf2295df89ccfa2dda41997a28307a90cf28"
|
||||||
|
@ -2,9 +2,9 @@ kernel:
|
|||||||
image: "linuxkit/kernel:4.4.x"
|
image: "linuxkit/kernel:4.4.x"
|
||||||
cmdline: "console=ttyS0"
|
cmdline: "console=ttyS0"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
- linuxkit/init:d04cb1ef203f3d3b320e2a7d0ded127d21cabd74
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
onboot:
|
onboot:
|
||||||
- name: check-kernel-config
|
- name: check-kernel-config
|
||||||
image: "linuxkit/test-kernel-config:2acaa564c1801dd2ae1546c70c472dc58ac030a1"
|
image: "linuxkit/test-kernel-config:2acaa564c1801dd2ae1546c70c472dc58ac030a1"
|
||||||
|
@ -2,9 +2,9 @@ kernel:
|
|||||||
image: "linuxkit/kernel:4.9.x"
|
image: "linuxkit/kernel:4.9.x"
|
||||||
cmdline: "console=ttyS0"
|
cmdline: "console=ttyS0"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
- linuxkit/init:d04cb1ef203f3d3b320e2a7d0ded127d21cabd74
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
onboot:
|
onboot:
|
||||||
- name: check-kernel-config
|
- name: check-kernel-config
|
||||||
image: "linuxkit/test-kernel-config:2acaa564c1801dd2ae1546c70c472dc58ac030a1"
|
image: "linuxkit/test-kernel-config:2acaa564c1801dd2ae1546c70c472dc58ac030a1"
|
||||||
|
@ -2,9 +2,9 @@ kernel:
|
|||||||
image: "linuxkit/kernel:4.11.x"
|
image: "linuxkit/kernel:4.11.x"
|
||||||
cmdline: "console=ttyS0"
|
cmdline: "console=ttyS0"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
- linuxkit/init:d04cb1ef203f3d3b320e2a7d0ded127d21cabd74
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
onboot:
|
onboot:
|
||||||
- name: check-kernel-config
|
- name: check-kernel-config
|
||||||
image: "linuxkit/test-kernel-config:2acaa564c1801dd2ae1546c70c472dc58ac030a1"
|
image: "linuxkit/test-kernel-config:2acaa564c1801dd2ae1546c70c472dc58ac030a1"
|
||||||
|
@ -2,9 +2,9 @@ kernel:
|
|||||||
image: "linuxkit/kernel:4.9.x"
|
image: "linuxkit/kernel:4.9.x"
|
||||||
cmdline: "console=ttyS0"
|
cmdline: "console=ttyS0"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
- linuxkit/init:d04cb1ef203f3d3b320e2a7d0ded127d21cabd74
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
onboot:
|
onboot:
|
||||||
- name: check
|
- name: check
|
||||||
image: "kmod-test"
|
image: "kmod-test"
|
||||||
|
@ -2,9 +2,9 @@ kernel:
|
|||||||
image: "linuxkit/kernel:4.9.x"
|
image: "linuxkit/kernel:4.9.x"
|
||||||
cmdline: "console=ttyS0"
|
cmdline: "console=ttyS0"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
- linuxkit/init:d04cb1ef203f3d3b320e2a7d0ded127d21cabd74
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
||||||
onboot:
|
onboot:
|
||||||
- name: sysctl
|
- name: sysctl
|
||||||
|
@ -2,9 +2,9 @@ kernel:
|
|||||||
image: "linuxkit/kernel:4.9.x"
|
image: "linuxkit/kernel:4.9.x"
|
||||||
cmdline: "console=ttyS0 page_poison=1"
|
cmdline: "console=ttyS0 page_poison=1"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
- linuxkit/init:d04cb1ef203f3d3b320e2a7d0ded127d21cabd74
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
onboot:
|
onboot:
|
||||||
- name: test
|
- name: test
|
||||||
image: "alpine:3.6"
|
image: "alpine:3.6"
|
||||||
|
@ -2,9 +2,9 @@ kernel:
|
|||||||
image: "linuxkit/kernel:4.9.x"
|
image: "linuxkit/kernel:4.9.x"
|
||||||
cmdline: "console=ttyS0 page_poison=1"
|
cmdline: "console=ttyS0 page_poison=1"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
- linuxkit/init:d04cb1ef203f3d3b320e2a7d0ded127d21cabd74
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
onboot:
|
onboot:
|
||||||
- name: binfmt
|
- name: binfmt
|
||||||
image: "linuxkit/binfmt:8ac5535f57f0c6f5fe88317b9d22a7677093c765"
|
image: "linuxkit/binfmt:8ac5535f57f0c6f5fe88317b9d22a7677093c765"
|
||||||
|
@ -2,9 +2,9 @@ kernel:
|
|||||||
image: "linuxkit/kernel:4.9.x"
|
image: "linuxkit/kernel:4.9.x"
|
||||||
cmdline: "console=ttyS0 page_poison=1"
|
cmdline: "console=ttyS0 page_poison=1"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
- linuxkit/init:d04cb1ef203f3d3b320e2a7d0ded127d21cabd74
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
- linuxkit/ca-certificates:75cf419fb58770884c3464eb687ec8dfc704169d
|
||||||
onboot:
|
onboot:
|
||||||
- name: test
|
- name: test
|
||||||
|
@ -2,9 +2,9 @@ kernel:
|
|||||||
image: "linuxkit/kernel:4.9.x"
|
image: "linuxkit/kernel:4.9.x"
|
||||||
cmdline: "console=ttyS0 page_poison=1"
|
cmdline: "console=ttyS0 page_poison=1"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
- linuxkit/init:d04cb1ef203f3d3b320e2a7d0ded127d21cabd74
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
onboot:
|
onboot:
|
||||||
- name: dhcpcd
|
- name: dhcpcd
|
||||||
image: "linuxkit/dhcpcd:7d2b8aaaf20c24ad7d11a5ea2ea5b4a80dc966f1"
|
image: "linuxkit/dhcpcd:7d2b8aaaf20c24ad7d11a5ea2ea5b4a80dc966f1"
|
||||||
|
@ -2,9 +2,9 @@ kernel:
|
|||||||
image: "linuxkit/kernel:4.9.x"
|
image: "linuxkit/kernel:4.9.x"
|
||||||
cmdline: "console=ttyS0"
|
cmdline: "console=ttyS0"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
- linuxkit/init:d04cb1ef203f3d3b320e2a7d0ded127d21cabd74
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
onboot:
|
onboot:
|
||||||
- name: mkimage
|
- name: mkimage
|
||||||
image: "linuxkit/mkimage:f4bf0c24261f7d120c8674892805ab3054eb8ac3"
|
image: "linuxkit/mkimage:f4bf0c24261f7d120c8674892805ab3054eb8ac3"
|
||||||
|
@ -2,9 +2,9 @@ kernel:
|
|||||||
image: "linuxkit/kernel:4.9.x"
|
image: "linuxkit/kernel:4.9.x"
|
||||||
cmdline: "console=ttyS0"
|
cmdline: "console=ttyS0"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
- linuxkit/init:d04cb1ef203f3d3b320e2a7d0ded127d21cabd74
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
onboot:
|
onboot:
|
||||||
- name: poweroff
|
- name: poweroff
|
||||||
image: "linuxkit/poweroff:7404cf2295df89ccfa2dda41997a28307a90cf28"
|
image: "linuxkit/poweroff:7404cf2295df89ccfa2dda41997a28307a90cf28"
|
||||||
|
@ -2,9 +2,9 @@ kernel:
|
|||||||
image: "linuxkit/kernel:4.9.x"
|
image: "linuxkit/kernel:4.9.x"
|
||||||
cmdline: "console=ttyS0 page_poison=1"
|
cmdline: "console=ttyS0 page_poison=1"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
- linuxkit/init:d04cb1ef203f3d3b320e2a7d0ded127d21cabd74
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
onboot:
|
onboot:
|
||||||
- name: sysctl
|
- name: sysctl
|
||||||
image: "linuxkit/sysctl:3aa6bc663c2849ef239be7d941d3eaf3e6fcc018"
|
image: "linuxkit/sysctl:3aa6bc663c2849ef239be7d941d3eaf3e6fcc018"
|
||||||
|
@ -2,9 +2,9 @@ kernel:
|
|||||||
image: "linuxkit/kernel:4.9.x"
|
image: "linuxkit/kernel:4.9.x"
|
||||||
cmdline: "console=ttyS0"
|
cmdline: "console=ttyS0"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
- linuxkit/init:d04cb1ef203f3d3b320e2a7d0ded127d21cabd74
|
||||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
onboot:
|
onboot:
|
||||||
- name: ltp
|
- name: ltp
|
||||||
image: "linuxkit/test-ltp:6df23ac196332cafb9c0f8e32f328e22d612267d"
|
image: "linuxkit/test-ltp:6df23ac196332cafb9c0f8e32f328e22d612267d"
|
||||||
|
@ -4,9 +4,9 @@ kernel:
|
|||||||
image: "linuxkit/kernel:4.9.x"
|
image: "linuxkit/kernel:4.9.x"
|
||||||
cmdline: "console=ttyS0"
|
cmdline: "console=ttyS0"
|
||||||
init:
|
init:
|
||||||
- linuxkit/init:781cec2360313a6d4aca25f5e90623294f8432f7
|
- linuxkit/init:d04cb1ef203f3d3b320e2a7d0ded127d21cabd74
|
||||||
- linuxkit/runc:2649198589ef0020d99f613adaeda45ce0093a38
|
- linuxkit/runc:2649198589ef0020d99f613adaeda45ce0093a38
|
||||||
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
- linuxkit/containerd:7858fceb91c26c1e2ae9d84ac1ea0c63bbe61e26
|
||||||
onboot:
|
onboot:
|
||||||
- name: dhcpcd
|
- name: dhcpcd
|
||||||
image: "linuxkit/dhcpcd:7d2b8aaaf20c24ad7d11a5ea2ea5b4a80dc966f1"
|
image: "linuxkit/dhcpcd:7d2b8aaaf20c24ad7d11a5ea2ea5b4a80dc966f1"
|
||||||
|
Loading…
Reference in New Issue
Block a user