forked from dentproject/testing
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·27 lines (21 loc) · 758 Bytes
/
run.sh
File metadata and controls
executable file
·27 lines (21 loc) · 758 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
export DOCKER_BUILDKIT=1
PWD=$(pwd)
COMMAND="/bin/bash"
SCRIPT_DIR=$(dirname "$0")
DOCKERFILE_DIR=$SCRIPT_DIR
# Build base image
docker build -f "$DOCKERFILE_DIR"/Dockerfile.base -t dent/test-framework-base:latest .
# Build working image
docker build -f "$DOCKERFILE_DIR"/Dockerfile.auto -t dent/test-framework-dev:latest .
if [ -n "$1" ]; then
COMMAND="$*"
fi
docker run \
-ti --rm \
--mount=type=bind,target=/DENT/DentOsTestbed,source="$PWD"/DentOsTestbed \
--mount=type=bind,target=/DENT/DentOsTestbedDiscovery,source="$PWD"/DentOsTestbedDiscovery \
--mount=type=bind,target=/DENT/DentOsTestbedLib,source="$PWD"/DentOsTestbedLib \
--name dent-testing-"$USER" \
dent/test-framework-dev:latest \
"$COMMAND"