Merge pull request #156 from justincormack/no-init

Remove unused init package
This commit is contained in:
Justin Cormack 2017-10-03 14:10:16 +01:00 committed by GitHub
commit ccaba8acc1
5 changed files with 0 additions and 67 deletions

View File

@ -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/

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -1,12 +0,0 @@
Welcome to LinuxKit
## .
## ## ## ==
## ## ## ## ## ===
/"""""""""""""""""\___/ ===
{ / ===-
\______ O __/
\ \ __/
\____\_______/