create dockerfile for tip container
This commit is contained in:
parent
82c5a11a57
commit
67e3f28e51
22
Dockerfile
22
Dockerfile
|
@ -3,16 +3,12 @@ FROM debian@sha256:bf338ddc710dfb9b907a29ba661b35d0f6b3eae043515c4315f64c6e93409
|
||||||
LABEL MAINTAINER=chamalow <@qio8/4L4vnzq3qRD0dqKI7sTpey54u8ZWbaICfpJOZw=.ed25519>
|
LABEL MAINTAINER=chamalow <@qio8/4L4vnzq3qRD0dqKI7sTpey54u8ZWbaICfpJOZw=.ed25519>
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
ENV NVM_INSTALL_DIR /opt/nvm
|
|
||||||
ENV NVM_DIR /usr/local/nvm
|
|
||||||
ENV NODE_VERSION v12.16.1
|
|
||||||
ENV RUSTUP_HOME /usr/local/rustup
|
ENV RUSTUP_HOME /usr/local/rustup
|
||||||
ENV CARGO_HOME /usr/local/cargo
|
ENV CARGO_HOME /usr/local/cargo
|
||||||
ENV PATH /usr/local/cargo/bin:$PATH
|
ENV PATH /usr/local/cargo/bin:$PATH
|
||||||
ENV RUST_VERSION 1.42.0
|
ENV RUST_VERSION 1.42.0
|
||||||
|
|
||||||
COPY ./key_create_dunikey.py /usr/bin/key_create_dunikey
|
COPY ./key_create_dunikey.py /usr/bin/key_create_dunikey
|
||||||
COPY ./secret2dunikey.sh /usr/bin/secret2dunikey
|
|
||||||
COPY ./find_ssb_user_G1_pubkey.sh /usr/bin/find_ssb_user_G1_pubkey
|
COPY ./find_ssb_user_G1_pubkey.sh /usr/bin/find_ssb_user_G1_pubkey
|
||||||
COPY ./tip.sh /usr/bin/tip
|
COPY ./tip.sh /usr/bin/tip
|
||||||
|
|
||||||
|
@ -44,14 +40,6 @@ RUN set -eux; \
|
||||||
cargo --version; \
|
cargo --version; \
|
||||||
rustc --version;
|
rustc --version;
|
||||||
|
|
||||||
RUN git clone https://github.com/creationix/nvm.git $NVM_INSTALL_DIR && \
|
|
||||||
. $NVM_INSTALL_DIR/nvm.sh && \
|
|
||||||
nvm install --lts && \
|
|
||||||
nvm alias default $NODE_VERSION && \
|
|
||||||
nvm use default && \
|
|
||||||
echo "export NVM_DIR=${NVM_DIR}" > /home/astroport/.bashrc && \
|
|
||||||
echo ". ${NVM_INSTALL_DIR}/nvm.sh" > /home/astroport/.bashrc && \
|
|
||||||
chown -R astroport:astroport $NVM_DIR
|
|
||||||
|
|
||||||
RUN git clone https://git.scuttlebot.io/%25133ulDgs%2FoC1DXjoK04vDFy6DgVBB%2FZok15YJmuhD5Q%3D.sha256 sbotc
|
RUN git clone https://git.scuttlebot.io/%25133ulDgs%2FoC1DXjoK04vDFy6DgVBB%2FZok15YJmuhD5Q%3D.sha256 sbotc
|
||||||
WORKDIR /sbotc
|
WORKDIR /sbotc
|
||||||
|
@ -63,22 +51,14 @@ WORKDIR /dup-mnemonic-rs
|
||||||
RUN cargo build --release && \
|
RUN cargo build --release && \
|
||||||
cp target/release/dup-mnemonic /usr/local/bin
|
cp target/release/dup-mnemonic /usr/local/bin
|
||||||
|
|
||||||
|
|
||||||
COPY ./docker/config /home/astroport/.ssb/
|
|
||||||
COPY ./docker/run-ssb-pub.sh /home/astroport/
|
|
||||||
COPY ./docker/docker-entrypoint.sh /home/astroport/
|
COPY ./docker/docker-entrypoint.sh /home/astroport/
|
||||||
COPY ./samples /home/astroport/
|
COPY ./samples /home/astroport/
|
||||||
|
|
||||||
RUN chmod +x /home/astroport/run-ssb-pub.sh /home/astroport/docker-entrypoint.sh
|
RUN chmod +x /home/astroport/docker-entrypoint.sh
|
||||||
|
|
||||||
USER astroport
|
USER astroport
|
||||||
WORKDIR /home/astroport
|
WORKDIR /home/astroport
|
||||||
|
|
||||||
RUN . ~/.bashrc && \
|
|
||||||
mkdir -p /home/astroport/.ssb/ && \
|
|
||||||
npm install -g sodium-native@3.0.0 ssb-backlinks@1.0.0 && \
|
|
||||||
npm install -g ssb-server@15.2.0
|
|
||||||
|
|
||||||
VOLUME [ "/home/astroport/.ssb/" ]
|
VOLUME [ "/home/astroport/.ssb/" ]
|
||||||
EXPOSE 8008
|
EXPOSE 8008
|
||||||
|
|
||||||
|
|
|
@ -49,10 +49,14 @@ services:
|
||||||
context: ./ssb-server
|
context: ./ssb-server
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
ports:
|
ports:
|
||||||
- "8008:8008"
|
- "8009:8008"
|
||||||
volumes:
|
volumes:
|
||||||
- ~/.ssb-test/:/home/astroport/.ssb
|
- ~/.ssb-test/:/home/astroport/.ssb
|
||||||
secret2dunikey:
|
secret2dunikey:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: ./secret2dunikey/Dockerfile
|
dockerfile: ./secret2dunikey/Dockerfile
|
||||||
|
tip:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: ./tip/Dockerfile
|
|
@ -1,7 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
. ~/.bashrc
|
. ~/.bashrc
|
||||||
|
|
||||||
echo "run ssb-server"
|
|
||||||
bash /home/astroport/run-ssb-pub.sh
|
|
||||||
|
|
||||||
tail -f /dev/null
|
tail -f /dev/null
|
|
@ -0,0 +1,27 @@
|
||||||
|
FROM debian@sha256:bf338ddc710dfb9b907a29ba661b35d0f6b3eae043515c4315f64c6e93409e94
|
||||||
|
|
||||||
|
LABEL MAINTAINER=chamalow <@qio8/4L4vnzq3qRD0dqKI7sTpey54u8ZWbaICfpJOZw=.ed25519>
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
|
||||||
|
COPY ./tip.sh /usr/bin/tip
|
||||||
|
COPY ./samples /
|
||||||
|
|
||||||
|
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 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/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 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 .ssb
|
||||||
|
VOLUME [ "/home/astroport/.ssb"]
|
||||||
|
ENTRYPOINT ["/bin/bash"]
|
||||||
|
CMD ["/usr/bin/tip"]
|
Loading…
Reference in New Issue