From fdee7f3792a3726f6e51e6de47eec76b67b77c83 Mon Sep 17 00:00:00 2001 From: Justin Cormack Date: Tue, 3 Oct 2017 13:42:48 +0100 Subject: [PATCH] Remove unused init package We now use the same on as linuxkit. Signed-off-by: Justin Cormack --- pkg/init-container/Dockerfile | 14 -------------- pkg/init-container/Makefile | 18 ------------------ pkg/init-container/bin/rc.init | 11 ----------- pkg/init-container/etc/init.d/000-issue | 12 ------------ pkg/init-container/etc/issue | 12 ------------ 5 files changed, 67 deletions(-) delete mode 100644 pkg/init-container/Dockerfile delete mode 100644 pkg/init-container/Makefile delete mode 100755 pkg/init-container/bin/rc.init delete mode 100755 pkg/init-container/etc/init.d/000-issue delete mode 100644 pkg/init-container/etc/issue diff --git a/pkg/init-container/Dockerfile b/pkg/init-container/Dockerfile deleted file mode 100644 index 08f620890..000000000 --- a/pkg/init-container/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM linuxkit/alpine:630ee558e4869672fae230c78364e367b8ea67a9 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 busybox musl tini - -# Remove apk residuals. We have a read-only rootfs, so apk is of no use. -RUN rm -rf /out/etc/apk /out/lib/apk /out/var/cache - -FROM scratch -ENTRYPOINT [] -CMD [] -WORKDIR / -COPY --from=mirror /out/ / -COPY etc etc/ -COPY bin bin/ diff --git a/pkg/init-container/Makefile b/pkg/init-container/Makefile deleted file mode 100644 index 142ca0d5a..000000000 --- a/pkg/init-container/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -.PHONY: tag push -default: push - -ORG?=mobytest -IMAGE=init-container -DEPS=Dockerfile $(wildcard etc/init.d/*) $(wildcard bin/*) - -HASH?=$(shell git ls-tree HEAD -- ../$(notdir $(CURDIR)) | awk '{print $$3}') - -tag: $(DEPS) - docker build --no-cache --network=none -t $(ORG)/$(IMAGE):$(HASH) . - -push: tag - docker pull $(ORG)/$(IMAGE):$(HASH) || \ - docker push $(ORG)/$(IMAGE):$(HASH) - -forcepush: tag - docker push $(ORG)/$(IMAGE):$(HASH) diff --git a/pkg/init-container/bin/rc.init b/pkg/init-container/bin/rc.init deleted file mode 100755 index c2e824d83..000000000 --- a/pkg/init-container/bin/rc.init +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -# execute other init processes -INITS="$(find /etc/init.d ! -type d 2>/dev/null | sort)" -for f in $INITS -do - $f -done - -# wait forever to keep container open -while true; do sleep 2147483647; done diff --git a/pkg/init-container/etc/init.d/000-issue b/pkg/init-container/etc/init.d/000-issue deleted file mode 100755 index 7b98c331c..000000000 --- a/pkg/init-container/etc/init.d/000-issue +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -if [ -f /etc/issue ]; then - for opt in $(cat /proc/cmdline); do - case "$opt" in - console=*) - fulltty=${opt#console=} - tty=${fulltty%,*} - cat /etc/issue >> /dev/$tty - esac - done -fi diff --git a/pkg/init-container/etc/issue b/pkg/init-container/etc/issue deleted file mode 100644 index 946b06234..000000000 --- a/pkg/init-container/etc/issue +++ /dev/null @@ -1,12 +0,0 @@ - -Welcome to LinuxKit - - ## . - ## ## ## == - ## ## ## ## ## === - /"""""""""""""""""\___/ === - { / ===- - \______ O __/ - \ \ __/ - \____\_______/ -