p≡p for Java
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.3 KiB

  1. ARG DOCKER_REGISTRY_HOST
  2. ARG CURRENT_DISTRO
  3. ARG PEPENGINE_VERSION
  4. FROM ${DOCKER_REGISTRY_HOST}/pep-${CURRENT_DISTRO}-engine:${PEPENGINE_VERSION}
  5. ENV BUILDROOT /build
  6. ENV INSTPREFIX /install
  7. ENV OUTDIR /out
  8. ARG LIBPEPADAPTER_VERSION
  9. ARG CURRENT_DISTRO
  10. ## Build and install libpEpAdapter
  11. ### Setup working directory
  12. RUN git clone --depth=1 \
  13. https://gitea.pep.foundation/pEp.foundation/libpEpAdapter.git \
  14. -b ${LIBPEPADAPTER_VERSION} \
  15. ${BUILDROOT}/libpEpAdapter
  16. WORKDIR ${BUILDROOT}/libpEpAdapter
  17. ### Build libpEpAdapter
  18. RUN sh ./scripts/${CURRENT_DISTRO}/build_libpEpAdapter.sh && \
  19. rm -rf ${BUILDROOT}/*
  20. ### Install system dependencies
  21. USER root
  22. RUN apt-get update -yqq && \
  23. apt-get install -yqq default-jdk-headless
  24. USER pep-builder
  25. ## Build and install pEpJNIAdapter
  26. ### Setup working directory
  27. RUN mkdir ${BUILDROOT}/pEpJNIAdapter
  28. COPY . ${BUILDROOT}/pEpJNIAdapter
  29. USER root
  30. RUN chown -R pep-builder:pep-builder ${BUILDROOT}/pEpJNIAdapter
  31. USER pep-builder
  32. WORKDIR ${BUILDROOT}/pEpJNIAdapter
  33. ARG PEPJNIADAPTER_VERSION
  34. ARG CURRENT_DISTRO
  35. ### Build pEpJNIAdapter
  36. RUN sh ./scripts/${CURRENT_DISTRO}/build_pEpJNIAdapter.sh && \
  37. install -m 644 -t ${INSTPREFIX}/lib dist/libpEpJNI.a && \
  38. install -m 755 -t ${INSTPREFIX}/lib dist/libpEpJNI.so && \
  39. install -m 644 -t ${INSTPREFIX}/lib dist/pEp.jar && \
  40. rm -rf ${BUILDROOT}/*