repertory/scripts/run_docker_shell.sh
Scott E. Graves 6ba4c0091b
Some checks failed
BlockStorage/repertory_linux_builds/pipeline/head There was a failure building this commit
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
fix
2023-11-30 09:24:51 -06:00

26 lines
571 B
Bash
Executable File

#!/bin/bash
pushd "$(dirname "$0")"
CURRENT_DIR=$(pwd)
pushd "${CURRENT_DIR}/.."
NAME=$1
TYPE=$2
if [ -z "$NAME" ]; then
echo "Name not set"
else
if [ -z "${TYPE}" ]; then
TYPE=64_bit
fi
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
popd
popd