Skip to content

Commit

Permalink
upd dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
wanwiset25 committed Dec 19, 2023
1 parent f3330bf commit 8869924
Showing 1 changed file with 2 additions and 32 deletions.
34 changes: 2 additions & 32 deletions subnet/deployment-generator/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,42 +1,12 @@

FROM golang:1.14 as builder

ARG SUBNET_BRANCH=master

RUN git clone https://github.com/XinFinOrg/XDC-Subnet

#it is called 'BRANCH' but commits also work
RUN cd XDC-Subnet && git checkout ${SUBNET_BRANCH} && make puppeth





FROM node:18.15

ARG SUBNET_BRANCH=master
ARG IMAGE_NAME=latest
#inject build arg as ENV
ENV SUBNET_BRANCH=${SUBNET_BRANCH}
ENV IMAGE_NAME=${IMAGE_NAME}
RUN echo SUBNET_BRANCH=${SUBNET_BRANCH}
RUN echo IMAGE_NAME=${IMAGE_NAME}

WORKDIR /app

COPY --from=builder /go/XDC-Subnet/build/bin/puppeth /bin/puppeth
# COPY --from=builder /go/XDC-Subnet/mainnet_contract /app/contract

#this step here for caching
# RUN cd contract && yarn

COPY ./script /app/script
COPY ./src /app/src
COPY ./docker/start.sh /app/start.sh
COPY ./docker/deploy_csc.sh /app/deploy_csc.sh

RUN chmod +x /app/start.sh
RUN chmod +x /app/deploy_csc.sh

RUN cd script && npm install
RUN cd src && npm install

ENTRYPOINT ["bash","/app/start.sh"]

0 comments on commit 8869924

Please sign in to comment.