ctbrec

ctbrec docker file

Aug 11th, 2020
305
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. FROM alpine/git as open-m3u8Git
  2. WORKDIR /app
  3. RUN git clone https://github.com/0xboobface/open-m3u8.git
  4.  
  5. FROM gradle:4.10-jdk10 as open-m3u8Build
  6. WORKDIR /app/open-m3u8
  7. COPY --from=open-m3u8Git --chown=gradle:gradle /app /app
  8. RUN gradle install
  9.  
  10. FROM alpine/git as ctbrecGit
  11. WORKDIR /app
  12. RUN git clone https://github.com/0xboobface/ctbrec.git
  13.  
  14. FROM maven:3-jdk-11-slim as ctbrecBuild
  15. ARG ctbrec
  16. ARG versionM3u8
  17. WORKDIR /app/master
  18. COPY --from=ctbrecGit /app/ctbrec /app
  19. COPY --from=open-m3u8Build /app/open-m3u8/build/libs/ /app/common/libs/
  20. RUN mvn clean install:install-file -Dfile=/app/common/libs/open-m3u8-${versionM3u8}.jar -DgroupId=com.iheartradio.m3u8 -DartifactId=open-m3u8 -Dversion=${versionM3u8} -Dpackaging=jar -DgeneratePom=true
  21. RUN mvn clean
  22. RUN mvn install
  23.  
  24. FROM openjdk:12-alpine
  25. WORKDIR /app
  26. ARG memory
  27. ARG version
  28. ENV artifact ctbrec-server-${version}-final.jar
  29. ENV path /app/server/target/${artifact}
  30. COPY --from=ctbrecBuild ${path} ./${artifact}
  31. EXPOSE 8080
  32. CMD java ${memory} -cp ${artifact} -Dctbrec.config=/server.json ctbrec.recorder.server.HttpServer
  33.  
  34.  
Add Comment
Please, Sign In to add comment