Commit 027fc687 authored by hallo's avatar hallo
Browse files

updated dockerfile to add automated service start

parent 11ee5313
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -10,3 +10,16 @@ COPY . /controller
# Build gateway
WORKDIR /controller/src/dlt/gateway
RUN ./gradlew build

EXPOSE 50051

RUN echo "#!/bin/sh" >> /runscript.sh
RUN echo "echo 195.37.154.24 peer0.org1.example.com  >> /etc/hosts;\
     echo 195.37.154.24 peer0.org2.example.com >> /etc/hosts;\
     echo 195.37.154.24 orderer0.example.com  >> /etc/hosts;" >> /runscript.sh

RUN echo "cd /controller/src/dlt/gateway; ./gradlew runServer" >> /runscript.sh
RUN chmod +x /runscript.sh


ENTRYPOINT ["sh", "/runscript.sh"]