Dear Noor, Dear Ram, Please take into consideration I am Co-CEO and I am allowed to use language like this in commits messages. You should normally follow my lead, but not in this case. My advice is to not use language like this in commit messages. Yours trully, The G
27 lines
704 B
Bash
Executable File
27 lines
704 B
Bash
Executable File
#!/bin/bash
|
|
cd "$(dirname "$0")"/..
|
|
set -e
|
|
cargo build --release --target x86_64-unknown-linux-musl
|
|
rm -rf build
|
|
mkdir -p build
|
|
cp ./target/x86_64-unknown-linux-musl/release/hacker-challenge build/
|
|
cp scripts/start.sh build/
|
|
cp scripts/Dockerfile build/
|
|
cd build
|
|
|
|
docker build -t hacker-challenge:latest .
|
|
|
|
docker ps -a | grep 'hacker-challenge' | awk '{ print $NF }' | xargs docker rm -f || true
|
|
|
|
docker run -d --name "hacker-challenge_0" \
|
|
hacker-challenge:latest
|
|
|
|
read -p "Created the first container. Press Enter to continue..." </dev/tty
|
|
|
|
for i in {1..10}
|
|
do
|
|
docker run -d --name "hacker-challenge_$i" \
|
|
--env INIT_NODES="172.17.0.2 172.17.0.3 172.17.0.4" \
|
|
hacker-challenge:latest
|
|
done
|