Advertisement
yurystanev

Untitled

Dec 31st, 2019
414
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. FROM centos
  2. COPY ./ ./
  3.  
  4. # Install Dependencies
  5. RUN curl -sL https://rpm.nodesource.com/setup_10.x | bash -
  6. RUN yum install -y nodejs rpm-build redhat-rpm-config
  7. RUN rm -rf node_modules
  8. RUN npm i --production
  9. RUN yum install -y wget
  10. RUN wget https://github.com/mikefarah/yq/releases/download/2.4.1/yq_linux_amd64
  11. RUN chmod u+x yq_linux_amd64
  12.  
  13. # Build .rpm Package
  14. # Use pushd/popd in Dockerfile - https://stackoverflow.com/a/55434085/11511781
  15. RUN bash -xc "\
  16. mkdir -p /root/rpmbuild; \
  17. cp -r ./* /root/rpmbuild/; \
  18. pushd /root/rpmbuild; \
  19. npx speculate; \
  20. rpmbuild -bb /root/rpmbuild/SPECS/menlolab-runner.spec; \
  21. popd; \
  22. cp -r /root/rpmbuild/RPMS/x86_64/* .; \
  23. "
  24.  
  25. # Install MenloLab-Runner
  26. RUN v=`node -p 'require("./package.json").version'`
  27. RUN yum localinstall -y menlolab-runner-$v*.rpm
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement