forked from AleoNet/snarkOS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request AleoNet#1895 from AleoHQ/docker-builds
Upgrading Dockerfile to Ubuntu 22.04
- Loading branch information
Showing
5 changed files
with
109 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
version: "3.5" | ||
|
||
services: | ||
client: | ||
container_name: snarkos-client | ||
image: aleohq/snarkos:latest | ||
volumes: | ||
- snarkos-client-vol:/aleo/data | ||
build: | ||
context: . | ||
dockerfile: ./Dockerfile | ||
environment: | ||
RUST_LOG: "debug" | ||
SNARKOS_PORT: "0.0.0.0:4133" | ||
RPC_PORT: "0.0.0.0:3033" | ||
LOGLEVEL: "2" | ||
ALEO_PRIVKEY: | ||
restart: unless-stopped | ||
command: ["/aleo/entrypoint.sh"] | ||
ports: | ||
- 3033:3033 | ||
- 4133:4133 | ||
|
||
volumes: | ||
snarkos-client-vol: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
# running the Aleo Testnet3 client in a container | ||
|
||
# check if environment variables are set | ||
if [[ -z ${RUST_LOG+a} ]]; then | ||
RUST_LOG=debug | ||
fi | ||
|
||
if [[ -z ${SNARKOS_PORT+a} ]]; then | ||
SNARKOS_PORT="0.0.0.0:4133" | ||
fi | ||
|
||
if [[ -z ${RPC_PORT+a} ]]; then | ||
RPC_PORT="0.0.0.0:3033" | ||
fi | ||
|
||
if [[ -z ${LOGLEVEL+a} ]]; then | ||
LOGLEVEL="2" | ||
fi | ||
|
||
# if address is set | ||
if [ -z ${ALEO_PRIVKEY+a} ]; then | ||
/aleo/bin/snarkos --node ${SNARKOS_PORT} --rpc ${RPC_PORT} --verbosity ${LOGLEVEL} | ||
else | ||
/aleo/bin/snarkos --node ${SNARKOS_PORT} --rpc ${RPC_PORT} --verbosity ${LOGLEVEL} --private_key ${ALEO_PRIVKEY} | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
# running the Aleo Testnet3 client with Docker Compose | ||
|
||
# USAGE examples: | ||
# CLI : ./run-client-docker.sh | ||
|
||
while : | ||
do | ||
echo "Checking for the latest snarkOS container..." | ||
$(docker-compose pull && docker-compose --project-name aleo up -d) | ||
# sleeping 30 minutes | ||
sleep 1800 | ||
done |