diff --git a/docker/README.md b/docker/README.md index aaab6df2f3299ac6c26403a341b5977af10b3558..6aecbc41eb8b6e527f8ee080afe54afea41d6f22 100644 --- a/docker/README.md +++ b/docker/README.md @@ -10,6 +10,19 @@ docker build -t="duniter" . #### 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 -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 ```` diff --git a/docker/go b/docker/go index 504245885ee44025d74608f341f29f8efc1e38ef..28c150aad6ce210ee6eba704ffc2074d6fe0fc55 100644 --- a/docker/go +++ b/docker/go @@ -2,9 +2,14 @@ locale_ip=`awk 'NR==7 {print $1}' /etc/hosts` 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 config --noupnp --remote4 $remote_ip --ipv4 $locale_ip -duniter sync twiced.fr 9330 +duniter config --noupnp --remote4 $remote_ip --ipv4 $locale_ip $identity_args +duniter sync $DUNITER_URL $DUNITER_PORT duniter start tail -f /dev/null