blob: 8be05e000d22f055026b7e6375e631f56cb5b0df (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#!/bin/bash
set -euo pipefail
if docker inspect schwift-testing &>/dev/null; then
echo 'Already running.'
else
# The `readlink -f` converts the path to repo/testing/data to an absolute path.
DATA_PATH="$(readlink -f "$(dirname $0)")/data"
if [ ! -d "${DATA_PATH}" ]; then
mkdir "${DATA_PATH}"
chown 1000:1000 "${DATA_PATH}"
fi
exec docker run --name schwift-testing -P -v "${DATA_PATH}:/swift/nodes" -t bouncestorage/swift-aio
fi
|