hack: add Dockerfile and shell target

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
Tonis Tiigi
2019-03-22 16:23:09 -07:00
parent b5b4e98aee
commit 0487cc3ab7
5 changed files with 81 additions and 1 deletions

12
hack/shell Executable file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -e
function clean {
docker rmi $(cat $iidfile)
}
iidfile=$(mktemp -t docker-iidfile.XXXXXXXXXX)
docker build --iidfile $iidfile --target demo-env .
trap clean EXIT
docker run -it --privileged --rm $(cat $iidfile)