Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FROM centos
- COPY ./ ./
- # Install Dependencies
- RUN curl -sL https://rpm.nodesource.com/setup_10.x | bash -
- RUN yum install -y nodejs rpm-build redhat-rpm-config
- RUN rm -rf node_modules
- RUN npm i --production
- RUN yum install -y wget
- RUN wget https://github.com/mikefarah/yq/releases/download/2.4.1/yq_linux_amd64
- RUN chmod u+x yq_linux_amd64
- # Build .rpm Package
- # Use pushd/popd in Dockerfile - https://stackoverflow.com/a/55434085/11511781
- RUN bash -xc "\
- mkdir -p /root/rpmbuild; \
- cp -r ./* /root/rpmbuild/; \
- pushd /root/rpmbuild; \
- npx speculate; \
- rpmbuild -bb /root/rpmbuild/SPECS/menlolab-runner.spec; \
- popd; \
- cp -r /root/rpmbuild/RPMS/x86_64/* .; \
- "
- # Install MenloLab-Runner
- RUN v=`node -p 'require("./package.json").version'`
- RUN yum localinstall -y menlolab-runner-$v*.rpm
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement