You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
buildx/hack/shell

12 lines
241 B
Bash

#!/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)