66 lines
2.7 KiB
Docker
66 lines
2.7 KiB
Docker
FROM debian@sha256:bf338ddc710dfb9b907a29ba661b35d0f6b3eae043515c4315f64c6e93409e94
|
|
|
|
LABEL MAINTAINER=chamalow <@qio8/4L4vnzq3qRD0dqKI7sTpey54u8ZWbaICfpJOZw=.ed25519>
|
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
ENV RUSTUP_HOME /usr/local/rustup
|
|
ENV CARGO_HOME /usr/local/cargo
|
|
ENV PATH /usr/local/cargo/bin:$PATH
|
|
ENV RUST_VERSION 1.42.0
|
|
|
|
COPY ./key_create_dunikey.py /usr/bin/key_create_dunikey
|
|
COPY ./find_ssb_user_G1_pubkey.sh /usr/bin/find_ssb_user_G1_pubkey
|
|
COPY ./tip.sh /usr/bin/tip
|
|
|
|
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 curl=7.68.0-1 -y && \
|
|
chmod +x /usr/bin/secret2dunikey /usr/bin/key_create_dunikey /usr/bin/find_ssb_user_G1_pubkey /usr/bin/tip && \
|
|
pip3 install duniterpy==0.56.0 silkaj==0.7.6 && \
|
|
apt-get clean && \
|
|
rm -rf /var/lib/apt/lists/* && \
|
|
useradd -ms /bin/bash astroport
|
|
|
|
RUN set -eux; \
|
|
dpkgArch="$(dpkg --print-architecture)"; \
|
|
case "${dpkgArch##*-}" in \
|
|
amd64) rustArch='x86_64-unknown-linux-gnu'; rustupSha256='ad1f8b5199b3b9e231472ed7aa08d2e5d1d539198a15c5b1e53c746aad81d27b' ;; \
|
|
armhf) rustArch='armv7-unknown-linux-gnueabihf'; rustupSha256='6c6c3789dabf12171c7f500e06d21d8004b5318a5083df8b0b02c0e5ef1d017b' ;; \
|
|
arm64) rustArch='aarch64-unknown-linux-gnu'; rustupSha256='26942c80234bac34b3c1352abbd9187d3e23b43dae3cf56a9f9c1ea8ee53076d' ;; \
|
|
i386) rustArch='i686-unknown-linux-gnu'; rustupSha256='27ae12bc294a34e566579deba3e066245d09b8871dc021ef45fc715dced05297' ;; \
|
|
*) echo >&2 "unsupported architecture: ${dpkgArch}"; exit 1 ;; \
|
|
esac; \
|
|
url="https://static.rust-lang.org/rustup/archive/1.21.1/${rustArch}/rustup-init"; \
|
|
curl -O "$url"; \
|
|
echo "${rustupSha256} *rustup-init" | sha256sum -c -; \
|
|
chmod +x rustup-init; \
|
|
./rustup-init -y --no-modify-path --profile minimal --default-toolchain $RUST_VERSION; \
|
|
rm rustup-init; \
|
|
chmod -R a+w $RUSTUP_HOME $CARGO_HOME; \
|
|
rustup --version; \
|
|
cargo --version; \
|
|
rustc --version;
|
|
|
|
|
|
RUN git clone https://git.scuttlebot.io/%25133ulDgs%2FoC1DXjoK04vDFy6DgVBB%2FZok15YJmuhD5Q%3D.sha256 sbotc
|
|
WORKDIR /sbotc
|
|
RUN make && make install
|
|
|
|
WORKDIR /
|
|
RUN git clone https://git.duniter.org/tools/dup-mnemonic-rs
|
|
WORKDIR /dup-mnemonic-rs
|
|
RUN cargo build --release && \
|
|
cp target/release/dup-mnemonic /usr/local/bin
|
|
|
|
COPY ./docker/docker-entrypoint.sh /home/astroport/
|
|
COPY ./samples /home/astroport/
|
|
|
|
RUN chmod +x /home/astroport/docker-entrypoint.sh
|
|
|
|
USER astroport
|
|
WORKDIR /home/astroport
|
|
|
|
VOLUME [ "/home/astroport/.ssb/" ]
|
|
EXPOSE 8008
|
|
|
|
ENTRYPOINT [ "/bin/bash" ]
|
|
CMD ["docker-entrypoint.sh"] |