Dockerfile.build 678 B

12345678910111213141516171819
  1. # multi-stage build
  2. # use pbsbase image as builder
  3. # build script will be triggered
  4. FROM pbspro/pbsbase:centos7 AS builder
  5. # get latest PBS Pro source code
  6. RUN git clone https://github.com/pbspro/pbspro.git /src/pbspro && \
  7. bash /src/pbspro/docker/centos7/build.sh
  8. # base image
  9. FROM centos:7
  10. LABEL maintainer="mliu@altair.com"
  11. LABEL description="PBS Professional Open Source"
  12. # copy rpm and entrypoint script from builder
  13. COPY --from=builder /root/rpmbuild/RPMS/x86_64/pbspro-server-*.rpm .
  14. COPY --from=builder /src/pbspro/docker/centos7/entrypoint.sh /
  15. # install pbspro
  16. RUN yum install -y pbspro-server-*.rpm
  17. # run entrypoint script
  18. ENTRYPOINT ["bash", "/entrypoint.sh"]