From 2e826c1981d6bb4635590eea08fe3a4081e40997 Mon Sep 17 00:00:00 2001 From: joseelinchevalay Date: Mon, 16 Mar 2020 16:17:01 +0100 Subject: [PATCH 1/6] add dockerfile --- Dockerfile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ffa7773 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +FROM debian@sha256:bf338ddc710dfb9b907a29ba661b35d0f6b3eae043515c4315f64c6e93409e94 +LABEL MAINTAINER=chamalow <@qio8/4L4vnzq3qRD0dqKI7sTpey54u8ZWbaICfpJOZw=.ed25519> +ENV DEBIAN_FRONTEND noninteractive +COPY ./key_create_dunikey.py /usr/bin/key_create_dunikey +COPY ./process-likes-g1tx.sh /usr/bin/process-likes-g1tx +COPY ./secret2dunikey.sh /usr/bin/secret2dunikey + +RUN apt-get update -y && \ + apt-get install python3-pip=18.1-5 python3-setuptools=44.0.0-1 python3-wheel=0.33.6-2 libsodium-dev=1.0.18-1 jq=1.6-1 make=4.2.1-1.2 git=1:2.25.1-1 gcc=4:9.2.1-3.1 -y && \ + chmod +x /usr/bin/secret2dunikey /usr/bin/process-likes-g1tx /usr/bin/key_create_dunikey&& \ + pip3 install duniterpy==0.56.0 silkaj==0.7.6 && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* && \ + useradd -ms /bin/bash astroport + +USER astroport +WORKDIR /home/astroport +RUN mkdir -p /home/astroport/.ssb/ +VOLUME [ "/home/astroport/.ssb/" ] +EXPOSE 8008 + +ENTRYPOINT [ "/bin/bash" ] +CMD ["process-likes-g1tx"] \ No newline at end of file From 367c37c8b189a7fa6fe1a6a0ac818c9e12aa0945 Mon Sep 17 00:00:00 2001 From: joseelinchevalay Date: Mon, 16 Mar 2020 16:40:23 +0100 Subject: [PATCH 2/6] change documentation --- Dockerfile | 4 ++++ readme.md | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/Dockerfile b/Dockerfile index ffa7773..e7c1773 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,6 +13,10 @@ RUN apt-get update -y && \ rm -rf /var/lib/apt/lists/* && \ useradd -ms /bin/bash astroport +RUN git clone https://git.scuttlebot.io/%25133ulDgs%2FoC1DXjoK04vDFy6DgVBB%2FZok15YJmuhD5Q%3D.sha256 sbotc +WORKDIR /sbotc +RUN make && make install + USER astroport WORKDIR /home/astroport RUN mkdir -p /home/astroport/.ssb/ diff --git a/readme.md b/readme.md index a0a9245..e664e0f 100644 --- a/readme.md +++ b/readme.md @@ -59,4 +59,22 @@ Then, browse your filesystem to select your Duniter secret key stored in ~/.ssb/ ![Cesium log with keychain file](https://git.p2p.legal/axiom-team/ssb-g1like/raw/dev-boris/doc/cesium-dunikey-800.png) +## With docker (experimental) +First you need to build docker image + +``` +docker build -t ssb-g1like . +``` + +create your dunikey + +``` +docker run -ti --rm -v ~/.ssb:/home/astroport/.ssb ssb-g1like -c /usr/bin/secret2dunikey +``` + +run main script + +``` +docker run -ti --rm -v ~/.ssb:/home/astroport/.ssb ssb-g1like +``` From b8b5ac3d2be204fd79bc0d679e4b80f0e478c91f Mon Sep 17 00:00:00 2001 From: joseelinchevalay Date: Tue, 17 Mar 2020 17:45:27 +0100 Subject: [PATCH 3/6] add base58 and build-essential package --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e7c1773..4b7d9e6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ COPY ./process-likes-g1tx.sh /usr/bin/process-likes-g1tx COPY ./secret2dunikey.sh /usr/bin/secret2dunikey RUN apt-get update -y && \ - apt-get install python3-pip=18.1-5 python3-setuptools=44.0.0-1 python3-wheel=0.33.6-2 libsodium-dev=1.0.18-1 jq=1.6-1 make=4.2.1-1.2 git=1:2.25.1-1 gcc=4:9.2.1-3.1 -y && \ + apt-get install build-essential=12.8 python3-pip=18.1-5 python3-setuptools=44.0.0-1 python3-wheel=0.33.6-2 libsodium-dev=1.0.18-1 jq=1.6-1 make=4.2.1-1.2 git=1:2.25.1-1 gcc=4:9.2.1-3.1 base58=1.0.3-1 -y && \ chmod +x /usr/bin/secret2dunikey /usr/bin/process-likes-g1tx /usr/bin/key_create_dunikey&& \ pip3 install duniterpy==0.56.0 silkaj==0.7.6 && \ apt-get clean && \ From 61a94c4d9defa22e108470cee293b6d6300aee70 Mon Sep 17 00:00:00 2001 From: joseelinchevalay Date: Wed, 18 Mar 2020 14:14:53 +0100 Subject: [PATCH 4/6] updaate python3-wheel --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4b7d9e6..7bf3594 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ COPY ./process-likes-g1tx.sh /usr/bin/process-likes-g1tx COPY ./secret2dunikey.sh /usr/bin/secret2dunikey RUN apt-get update -y && \ - apt-get install build-essential=12.8 python3-pip=18.1-5 python3-setuptools=44.0.0-1 python3-wheel=0.33.6-2 libsodium-dev=1.0.18-1 jq=1.6-1 make=4.2.1-1.2 git=1:2.25.1-1 gcc=4:9.2.1-3.1 base58=1.0.3-1 -y && \ + apt-get install build-essential=12.8 python3-pip=18.1-5 python3-setuptools=44.0.0-1 python3-wheel=0.33.6-3 libsodium-dev=1.0.18-1 jq=1.6-1 make=4.2.1-1.2 git=1:2.25.1-1 gcc=4:9.2.1-3.1 base58=1.0.3-1 -y && \ chmod +x /usr/bin/secret2dunikey /usr/bin/process-likes-g1tx /usr/bin/key_create_dunikey&& \ pip3 install duniterpy==0.56.0 silkaj==0.7.6 && \ apt-get clean && \ From bf909804a5a62d2efca85cc3c8e6b150ce48b295 Mon Sep 17 00:00:00 2001 From: joseelinchevalay Date: Wed, 18 Mar 2020 17:48:48 +0100 Subject: [PATCH 5/6] add autoconf and libtool package --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7bf3594..62549ce 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ COPY ./process-likes-g1tx.sh /usr/bin/process-likes-g1tx COPY ./secret2dunikey.sh /usr/bin/secret2dunikey RUN apt-get update -y && \ - apt-get install build-essential=12.8 python3-pip=18.1-5 python3-setuptools=44.0.0-1 python3-wheel=0.33.6-3 libsodium-dev=1.0.18-1 jq=1.6-1 make=4.2.1-1.2 git=1:2.25.1-1 gcc=4:9.2.1-3.1 base58=1.0.3-1 -y && \ + apt-get install autoconf=2.69-11.1 build-essential=12.8 python3-pip=18.1-5 python3-setuptools=44.0.0-1 python3-wheel=0.33.6-3 libsodium-dev=1.0.18-1 jq=1.6-1 make=4.2.1-1.2 git=1:2.25.1-1 gcc=4:9.2.1-3.1 base58=1.0.3-1 libtool=2.4.6-14 -y && \ chmod +x /usr/bin/secret2dunikey /usr/bin/process-likes-g1tx /usr/bin/key_create_dunikey&& \ pip3 install duniterpy==0.56.0 silkaj==0.7.6 && \ apt-get clean && \ From bbb006e452412c0cf8f7d70200ffae700dc5e66d Mon Sep 17 00:00:00 2001 From: joseelinchevalay Date: Thu, 19 Mar 2020 08:54:30 +0100 Subject: [PATCH 6/6] try to add nvm --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 62549ce..614ff0f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,9 +6,10 @@ COPY ./process-likes-g1tx.sh /usr/bin/process-likes-g1tx COPY ./secret2dunikey.sh /usr/bin/secret2dunikey RUN apt-get update -y && \ - apt-get install autoconf=2.69-11.1 build-essential=12.8 python3-pip=18.1-5 python3-setuptools=44.0.0-1 python3-wheel=0.33.6-3 libsodium-dev=1.0.18-1 jq=1.6-1 make=4.2.1-1.2 git=1:2.25.1-1 gcc=4:9.2.1-3.1 base58=1.0.3-1 libtool=2.4.6-14 -y && \ + apt-get install autoconf=2.69-11.1 build-essential=12.8 python3-pip=18.1-5 python3-setuptools=44.0.0-1 python3-wheel=0.33.6-3 libsodium-dev=1.0.18-1 jq=1.6-1 make=4.2.1-1.2 git=1:2.25.1-1 gcc=4:9.2.1-3.1 base58=1.0.3-1 libtool=2.4.6-14 curl=7.68.0-1 -y && \ chmod +x /usr/bin/secret2dunikey /usr/bin/process-likes-g1tx /usr/bin/key_create_dunikey&& \ pip3 install duniterpy==0.56.0 silkaj==0.7.6 && \ + curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* && \ useradd -ms /bin/bash astroport