Commit 69236a4a authored by duanjinfei's avatar duanjinfei

update docker file

parent ca2b59cd
...@@ -12,14 +12,25 @@ WORKDIR /build ...@@ -12,14 +12,25 @@ WORKDIR /build
RUN git clone https://code.wuban.net.cn/odysseus/power-node && \ RUN git clone https://code.wuban.net.cn/odysseus/power-node && \
git clone https://code.wuban.net.cn/odysseus/odysseus-protocol git clone https://code.wuban.net.cn/odysseus/odysseus-protocol
RUN cd /build/power-node && sh start.sh && cp powerNode /powerNode && cp config.json /config.json && mkdir /conf && cp conf/app.conf /conf/app.conf RUN cd /power-node && sh build.sh && cp powerNode /powerNode
RUN cp config.json /config.json && mkdir /conf && cp conf/app.conf /conf/app.conf
RUN cp start.sh /start.sh
FROM alpine FROM alpine
WORKDIR /root WORKDIR /root
COPY --from=build /start.sh /usr/bin/start.sh
COPY --from=build /powerNode /usr/bin/powerNode COPY --from=build /powerNode /usr/bin/powerNode
COPY --from=build /config.json /root/config.json COPY --from=build /config.json /root/config.json
COPY --from=build /conf /root/conf COPY --from=build /conf /root/conf
ENTRYPOINT [ "powerNode" ] # Expose the port that the application listens on
\ No newline at end of file EXPOSE 9090
ENTRYPOINT [ "/start.sh"]
\ No newline at end of file
#!/bin/bash
rm -rf node node.log mydb
echo "rm data successful"
go get
echo "go get successful"
go build -o powerNode ./cmd
echo "build successful"
\ No newline at end of file
#!/bin/bash echo "Received $REWARD_ADDRESS=$REWARD_ADDRESS"
rm -rf node node.log mydb echo "Received $DOCKER_SERVER=$DOCKER_SERVER"
echo "rm data successful"
go get ./powerNode --reward $REWARD_ADDRESS --docker_server $DOCKER_SERVER
echo "go get successful" echo "running successfully"
go build -o powerNode ./cmd \ No newline at end of file
echo "build successful"
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment