The core protocol of WoopChain
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
woop/rosetta/infra/Dockerfile

53 lines
1.4 KiB

# Build
FROM golang:1.19 AS build
RUN apt update -y && \
apt install libgmp-dev libssl-dev git -y && \
apt -y clean all
ENV GOPATH=/root/go
ENV GO111MODULE=on
ENV WIKI_PATH=${GOPATH}/src/github.com/woop-chain
RUN mkdir -p $WIKI_PATH
WORKDIR $WIKI_PATH
RUN git clone https://github.com/woop-chain/woop.git && \
git clone https://github.com/woop-chain/bls.git && \
git clone https://github.com/woop-chain/mcl.git
WORKDIR $WIKI_PATH/woop
RUN go mod download
RUN go mod tidy
RUN make linux_static && \
cp ./bin/woop /root/woop && \
cp ./rosetta/infra/run.sh /root/run.sh && \
cp ./rosetta/infra/rclone.conf /root/rclone.conf
RUN cp ./rosetta/infra/woop-pstn.conf /root/woop-pstn.conf && \
cp ./rosetta/infra/woop-mainnet.conf /root/woop-mainnet.conf && \
cp ./.wiki/rosetta_local_fix.csv /root/rosetta_local_fix.csv
# Execution
FROM ubuntu:20.04
RUN apt update -y && \
apt install libgmp-dev libssl-dev ca-certificates rclone -y && \
apt -y clean all \
WORKDIR /root
COPY --from=build /root/woop /root/woop
COPY --from=build /root/run.sh /root/run.sh
COPY --from=build /root/rclone.conf /root/.config/rclone/rclone.conf
COPY --from=build /root/woop-pstn.conf /root/woop-pstn.conf
COPY --from=build /root/woop-mainnet.conf /root/woop-mainnet.conf
COPY --from=build /root/rosetta_local_fix.csv /root/rosetta_local_fix.csv
EXPOSE 9500/tcp
EXPOSE 9700/tcp
EXPOSE 9800/tcp
ENTRYPOINT ["/bin/bash","/root/run.sh"]