File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # I'm not that familiar with docker. Send a PR if something is wrong (^.^)
4+
5+ BASE_DIR=$( realpath " $( dirname " $BASH_SOURCE " ) " )
6+ if [[ ! -d " $BASE_DIR /auth" ]]; then
7+ echo " Creating Auth Directory.."
8+ mkdir -p " $BASE_DIR /auth"
9+ fi
10+
11+ CONTAINER=" zphisher"
12+ IMAGE=" htrtech/zphisher:latest"
13+ IMG_MIRROR=" ghcr.io/htr-tech/zphisher:latest"
14+ MOUNT_LOCATION=${BASE_DIR} /auth
15+ check_container=$( docker ps --all --format " {{.Names}}" )
16+
17+ if [[ ! $check_container == $CONTAINER ]]; then
18+ echo " Creating new container..."
19+ docker create \
20+ --interactive --tty \
21+ --volume ${MOUNT_LOCATION} :/zphisher/auth/ \
22+ --network host \
23+ --name " ${CONTAINER} " \
24+ " ${IMAGE} "
25+ fi
26+
27+ docker start --interactive " ${CONTAINER} "
28+
29+ # docker run --rm -ti --network="host" -v ${MOUNT_LOCATION}:/zphisher/auth/ --name "$CONTAINER" "$IMAGE"
You can’t perform that action at this time.
0 commit comments