blob: 7fa1d45ffaa633ea8cbe68ff4519f13e757c26b4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#!/bin/bash
set -exuo 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 "$(readlink -f "$(dirname $0)")/data:/swift/nodes" -t bouncestorage/swift-aio
fi
|