-
Notifications
You must be signed in to change notification settings - Fork 15
/
publish-docker-arm64.sh
47 lines (34 loc) · 1.82 KB
/
publish-docker-arm64.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
#!/bin/bash
#VERSION=0.35.6
VERSION=0.34.21
TESTNET_ROOT='./DOCKER/testnet'
PUBLISH_ROOT='./Phantasma.Node/src/bin/Debug/net6.0/linux-arm64/publish/'
NODE_PROJ='Phantasma.Node/src/Phantasma.Node.csproj'
LAST_COMMIT=`git rev-parse --short HEAD`
wget --no-check-certificate --content-disposition https://github.com/tendermint/tendermint/releases/download/v"$VERSION"/tendermint_"$VERSION"_linux_arm64.tar.gz
mkdir -p DOCKER/bin
tar -xzf tendermint_"$VERSION"_linux_arm64.tar.gz -C DOCKER/bin/
rm tendermint_"$VERSION"_linux_arm64.tar.gz
dotnet publish "$NODE_PROJ" --sc -r linux-arm64
mkdir -p "$TESTNET_ROOT"/node0/publish/
mkdir -p "$TESTNET_ROOT"/node1/publish/
mkdir -p "$TESTNET_ROOT"/node2/publish/
mkdir -p "$TESTNET_ROOT"/node3/publish/
cp -R "$PUBLISH_ROOT"* "$TESTNET_ROOT"/node0/publish
cp -R "$PUBLISH_ROOT"* "$TESTNET_ROOT"/node1/publish
cp -R "$PUBLISH_ROOT"* "$TESTNET_ROOT"/node2/publish
cp -R "$PUBLISH_ROOT"* "$TESTNET_ROOT"/node3/publish
cp -R "$TESTNET_ROOT"/node0/config_node0.json "$TESTNET_ROOT"/node0/publish/config.json
cp -R "$TESTNET_ROOT"/node1/config_node1.json "$TESTNET_ROOT"/node1/publish/config.json
cp -R "$TESTNET_ROOT"/node2/config_node2.json "$TESTNET_ROOT"/node2/publish/config.json
cp -R "$TESTNET_ROOT"/node3/config_node3.json "$TESTNET_ROOT"/node3/publish/config.json
docker build --platform=linux/arm64 -t phantasma-devnet:latest-arm64 -f DOCKER/Dockerfile .
#rm -rf "$TESTNET_ROOT"/node0/publish
#rm -rf "$TESTNET_ROOT"/node1/publish
#rm -rf "$TESTNET_ROOT"/node2/publish
#rm -rf "$TESTNET_ROOT"/node3/publish
docker tag phantasma-devnet:latest-arm64 phantasmachain/phantasma-devnet:latest-arm64
docker tag phantasma-devnet:latest-arm64 phantasmachain/phantasma-devnet:latest
# Publish Container
docker push phantasmachain/phantasma-devnet:latest-arm64
docker push phantasmachain/phantasma-devnet:latest