Commit fe628df8 authored by duanjinfei's avatar duanjinfei

update docker file test

parent cce927bb
......@@ -9,7 +9,7 @@ RUN go env -w CGO_ENABLED="1"
WORKDIR /build
RUN git clone https://code.wuban.net.cn/odysseus/power-node && \
RUN git clone -b test https://code.wuban.net.cn/odysseus/power-node && \
git clone https://code.wuban.net.cn/odysseus/odysseus-protocol
RUN cd /build/power-node
......
FROM golang:1.20-alpine AS build
# Install dependencies
RUN apk update && \
apk upgrade && \
apk add --no-cache bash git openssh make build-base
RUN go env -w CGO_ENABLED="1"
WORKDIR /build
RUN git clone -b test https://code.wuban.net.cn/odysseus/power-node && \
git clone https://code.wuban.net.cn/odysseus/odysseus-protocol
RUN cd /build/power-node
WORKDIR /build/power-node
RUN sh build.sh && cp /build/power-node/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
WORKDIR /root
COPY --from=build /start.sh /root/start.sh
COPY --from=build /powerNode /usr/bin/powerNode
COPY --from=build /config.json /root/config.json
COPY --from=build /conf /root/conf
RUN apk add --update curl
# Expose the port that the application listens on
EXPOSE 9090
RUN chmod +x /root/start.sh
CMD [ "/bin/sh","/root/start.sh"]
\ 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