ansible playbook to set up a laminar container Ci build. moved to: https://git.sindominio.net/sindominio/ansible_laminar
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible_laminar/base_image.run

26 lines
603 B

#!/bin/bash -ex
ROOTPATH="$WORKSPACE/rootfs"
FAKEROOT=fakechroot fakeroot
image="debian"
if [ -d ${ROOTPATH} ]
then
${FAKEROOT} chroot ${ROOTPATH} apt-get update
${FAKEROOT} chroot ${ROOTPATH} apt-get -s update --assume-no
if [ $? -eq 0 ]
then
echo "No updates needed"
exit 0
fi
rm -rf ${ROOTPATH}
fi
${FAKEROOT} /usr/sbin/debootstrap --force-check-gpg --variant=minbase --merged-usr stable ${ROOTPATH}
tar -C ${ROOTPATH} -c . | docker import -c 'CMD ["bash"]' - ${image}
docker tag ${image} {{ registry }}/${image}
docker push {{ registry }}/${image}
# TODO: rebuild dependent images