-
Notifications
You must be signed in to change notification settings - Fork 0
/
quickstart.sh
executable file
·59 lines (51 loc) · 1.43 KB
/
quickstart.sh
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
set -e
case "$1" in
standalone)
echo "Using standalone network"
ARGS="--standalone --enable-core-artificially-accelerate-time-for-testing"
;;
futurenet)
echo "Using Futurenet network"
ARGS="--futurenet"
;;
*)
echo "Usage: $0 standalone|futurenet"
exit 1
;;
esac
shift
# Run the soroban-preview container
# Remember to do:
# make build-docker
echo "Creating docker soroban network"
(docker network inspect soroban-network -f '{{.Id}}' 2>/dev/null) \
|| docker network create soroban-network
echo "Searching for a previous soroban-preview docker container"
containerID=$(docker ps --filter="name=soroban-preview" --all --quiet)
if [[ ${containerID} ]]; then
echo "Start removing soroban-preview container."
docker rm --force soroban-preview
echo "Finished removing soroban-preview container."
else
echo "No previous soroban-preview container was found"
fi
currentDir=$(pwd)
docker run -dti \
--volume ${currentDir}:/workspace \
--name soroban-preview \
-p 8001:8000 \
--ipc=host \
--network soroban-network \
soroban-preview:7
# Run the stellar quickstart image
docker run --rm -ti \
--platform linux/amd64 \
--name stellar \
--network soroban-network \
-p 8000:8000 \
stellar/quickstart:soroban-dev@sha256:81c23da078c90d0ba220f8fc93414d0ea44608adc616988930529c58df278739 \
$ARGS \
--enable-soroban-rpc \
--protocol-version 20 \
"$@" # Pass through args from the CLI