mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-09-01 15:08:33 +00:00
More cleanup
- remove more editions code - remove unused tool pad4 - add back whale to test output Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
@@ -5,7 +5,7 @@ IMAGE=check
|
||||
|
||||
default: push
|
||||
|
||||
hash: Dockerfile check.sh check-kernel-config.sh
|
||||
hash: Dockerfile check.sh check-kernel-config.sh etc/moby
|
||||
DOCKER_CONTENT_TRUST=1 docker pull $(BASE)
|
||||
tar cf - $^ | docker build --no-cache -t $(IMAGE):build -
|
||||
docker run --rm --entrypoint=/bin/sh $(IMAGE):build -c "cat $^ /lib/apk/db/installed | sha1sum" | sed 's/ .*//' > hash
|
||||
|
@@ -9,4 +9,7 @@ function failed {
|
||||
bash /check-config.sh || failed
|
||||
|
||||
printf "Moby test suite PASSED\n"
|
||||
|
||||
cat /etc/moby
|
||||
|
||||
/sbin/poweroff -f
|
||||
|
10
tools/check/etc/moby
Normal file
10
tools/check/etc/moby
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
## .
|
||||
## ## ## ==
|
||||
## ## ## ## ## ===
|
||||
/"""""""""""""""""\___/ ===
|
||||
~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ / ===- ~~~
|
||||
\______ o __/
|
||||
\ \ __/
|
||||
\____\_______/
|
||||
|
@@ -1,6 +0,0 @@
|
||||
FROM alpine:3.5
|
||||
|
||||
COPY . /
|
||||
|
||||
ENTRYPOINT ["/bin/sh", "-c"]
|
||||
CMD ["/pad4.sh"]
|
@@ -1,29 +0,0 @@
|
||||
.PHONY: tag push
|
||||
|
||||
BASE=alpine:3.5
|
||||
IMAGE=pad4
|
||||
|
||||
default: push
|
||||
|
||||
hash: Dockerfile pad4.sh
|
||||
DOCKER_CONTENT_TRUST=1 docker pull $(BASE)
|
||||
tar cf - $^ | docker build --no-cache -t $(IMAGE):build -
|
||||
docker run --rm --entrypoint=/bin/sh $(IMAGE):build -c 'cat Dockerfile pad4.sh /lib/apk/db/installed | sha1sum' | sed 's/ .*//' > hash
|
||||
|
||||
push: hash
|
||||
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
|
||||
(docker tag $(IMAGE):build mobylinux/$(IMAGE):$(shell cat hash) && \
|
||||
docker push mobylinux/$(IMAGE):$(shell cat hash))
|
||||
docker rmi $(IMAGE):build
|
||||
rm -f hash
|
||||
|
||||
tag: hash
|
||||
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
|
||||
docker tag $(IMAGE):build mobylinux/$(IMAGE):$(shell cat hash)
|
||||
docker rmi $(IMAGE):build
|
||||
rm -f hash
|
||||
|
||||
clean:
|
||||
rm -f hash
|
||||
|
||||
.DELETE_ON_ERROR:
|
@@ -1,28 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
cd /tmp
|
||||
|
||||
cat > initrd.img
|
||||
|
||||
SIZE=$(stat -c "%s" initrd.img)
|
||||
SIZE4=$(( $SIZE / 4 \* 4 ))
|
||||
DIFF=$(( $SIZE - $SIZE4 ))
|
||||
[ $DIFF -ne 0 ] && DIFF=$(( 4 - $DIFF ))
|
||||
|
||||
dd if=/dev/zero bs=1 count=$DIFF of=zeropad 2>/dev/null
|
||||
|
||||
cat zeropad >> initrd.img
|
||||
|
||||
SIZE=$(stat -c "%s" initrd.img)
|
||||
SIZE4=$(( $SIZE / 4 \* 4 ))
|
||||
DIFF=$(( $SIZE - $SIZE4 ))
|
||||
|
||||
if [ $DIFF -ne 0 ]
|
||||
then
|
||||
echo "Bad alignment" >2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cat initrd.img
|
Reference in New Issue
Block a user