Skip to content
Snippets Groups Projects
Commit 4a521237 authored by Christophe Chaudier's avatar Christophe Chaudier
Browse files

Generic docker image

We use environment vars for connect on money hub and use our identity on
the node.
parent cc50fd60
No related branches found
No related tags found
1 merge request!474Issue #473 - Generic docker image
...@@ -10,6 +10,19 @@ docker build -t="duniter" . ...@@ -10,6 +10,19 @@ docker build -t="duniter" .
#### Execute the container #### Execute the container
Without your indentity
```sh
docker run -p 8999:8999 \
-e "DUNITER_URL=cgeek.fr" -e "DUNITER_PORT=9330" \
-dt duniter
````
With your indentity
```sh ```sh
docker run -p 8999:8999 -dt duniter docker run -p 8999:8999 \
-e "DUNITER_URL=cgeek.fr" -e "DUNITER_PORT=9330" \
-e "DUNITER_SALT=<your_key_salt>" -e "DUNITER_PASSWD=<your_passwd>" \
-dt duniter
```` ````
...@@ -2,9 +2,14 @@ ...@@ -2,9 +2,14 @@
locale_ip=`awk 'NR==7 {print $1}' /etc/hosts` locale_ip=`awk 'NR==7 {print $1}' /etc/hosts`
remote_ip=`curl -s https://4.ifcfg.me/` remote_ip=`curl -s https://4.ifcfg.me/`
if [ -n $DUNITER_SALT ] && [ -n $DUNITER_PASSWD ]; then
identity_args="--salt $DUNITER_SALT --passwd $DUNITER_PASSWD"
else
identity_args=""
fi
duniter init --autoconf duniter init --autoconf
duniter config --noupnp --remote4 $remote_ip --ipv4 $locale_ip duniter config --noupnp --remote4 $remote_ip --ipv4 $locale_ip $identity_args
duniter sync twiced.fr 9330 duniter sync $DUNITER_URL $DUNITER_PORT
duniter start duniter start
tail -f /dev/null tail -f /dev/null
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment