Add a default CMD to the base image

This commit is contained in:
Olaf Meeuwissen 2017-08-19 15:08:04 +09:00
parent 08aba0edee
commit 492d0851bb
1 changed files with 13 additions and 1 deletions

View File

@ -18,7 +18,19 @@ docker run --rm \
IMAGE=$CI_REGISTRY_IMAGE
STAMP=$(date +%F)
tar -cC rootfs --exclude './dev/**' . | docker import - $IMAGE:$STAMP
tar -caf rootfs.tar.gz \
--directory rootfs \
--exclude './dev/**' \
--numeric-owner \
--transform 's,^\./,,' .
cat > Dockerfile <<EOF
FROM scratch
ADD rootfs.tar.gz /
CMD ["bash"]
EOF
docker build -t $IMAGE:$STAMP .
docker push $IMAGE:$STAMP
docker tag $IMAGE:$STAMP $IMAGE:jessie