repertory/run_docker_shell.sh
Scott E. Graves 3ff46723b8
Some checks failed
BlockStorage/repertory_osx/pipeline/head There was a failure building this commit
BlockStorage/repertory_windows/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
initial commit
2022-03-05 00:30:50 -06:00

20 lines
517 B
Bash
Executable File

#!/bin/bash
NAME=$1
if [ -z "$NAME" ]; then
echo "Name not set"
elif [ "$UID" != 0 ]; then
echo "Must be run as root"
exit 1
else
TYPE=64_bit
docker stop repertory_${NAME}
docker rm repertory_${NAME}
docker build -t repertory:${NAME} - < docker/${TYPE}/${NAME} && \
docker run -itd --device /dev/fuse --cap-add SYS_ADMIN --name repertory_${NAME} -v $(pwd):/mnt repertory:${NAME} && \
docker exec -it repertory_${NAME} /bin/bash
docker stop repertory_${NAME}
docker rm repertory_${NAME}
fi