#!/bin/bash

. debian/tests/common

/etc/init.d/docker start
defer '/etc/init.d/docker stop'
defer 'journalctl -u docker | tail'

# make sure Docker itself is working before we go too deep down the rabbit hole
docker version

debootstrap \
	--variant=minbase \
	focal \
	"$tempDir" \
	http://archive.ubuntu.com/ubuntu

tar -cC "$tempDir" . | docker import - focal
defer 'docker rmi focal'

docker run --name test focal true
defer 'docker rm -f test'
