사용자 도구

사이트 도구


java:openjdk:docker

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
java:openjdk:docker [2020/12/30 11:22]
kwon37xi
java:openjdk:docker [2022/02/16 15:04] (현재)
kwon37xi
줄 4: 줄 4:
   * [[https://www.javacodegeeks.com/2018/12/docker-jvm.html|Docker and the JVM | Java Code Geeks - 2018]]   * [[https://www.javacodegeeks.com/2018/12/docker-jvm.html|Docker and the JVM | Java Code Geeks - 2018]]
   * [[java:openjdk|OpenJDK]] and [[:docker|Docker]]   * [[java:openjdk|OpenJDK]] and [[:docker|Docker]]
 +
 +===== Temurin - docker =====
 +  * https://hub.docker.com/_/eclipse-temurin
 +
 +===== alipine 회피 =====
 +  * 내 경험상 [[https://www.musl-libc.org/|musl-libc]] 기반의 [[linux:alpine|Alpine Linux]] 은 JDK와 각종 문제를 일으켰다. 그냥 glibc 기반의 [[linux:debian|Debian Linux]], [[linux:rhel|RHEL - RedHat Enterprise Linux and derivations]] 계열의 이미지를 사용하는게 더 잘 작동했다.
 +  * JDK 16 부터는 나아졌다는 얘기가 있다
 +    * [[https://openjdk.java.net/projects/harfbuzz|JEP 386: Alpine Linux Port]]
 +    * [[https://blog.adoptopenjdk.net/2021/03/adoptopenjdk-16-available/|AdoptOpenJDK 16 Available | AdoptOpenJDK Blog]] - ''AdoptOpenJDK for Alpine Linux With musl libc''항목. 기존의 temurin docker 이미지는 alpine 에 glibc 라이브러리를 함께 배포하는 거였으나 16 버전부터 [[https://www.musl-libc.org/|musl]] 을 그대로 사용함. 그러나 그렇다고 해도 musl 에 문제가 없다는 의미는 아님. musl 기반으로 빌드를 했다는 얘기일 뿐.
 +  * [[https://hub.docker.com/_/eclipse-temurin|temurin docker]]의 설명에서도 alpine 계열에 문제가 있을 수 있음이 나온다.(2022년 현재)
 +
 +> This variant is useful when final image size being as small as possible is your primary concern. The main caveat to note is that it does use musl libc instead of glibc and friends, so software will often run into issues depending on the depth of their libc requirements/assumptions. See this [[https://news.ycombinator.com/item?id=10782897|Hacker News comment thread]] for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images.
 +
  
 ===== 기본 배포판 ===== ===== 기본 배포판 =====
줄 24: 줄 37:
 CMD ["java", "Main"] CMD ["java", "Main"]
 </code> </code>
 +
 +===== jlink 로 최소 JRE 배포 =====
 +  * [[https://blog.adoptium.net/2021/08/using-jlink-in-dockerfiles/|Using Jlink in Dockerfiles instead of a JRE | Adoptium Blog]]
  
 ===== 참조 ===== ===== 참조 =====
   * [[https://foojay.io/today/5-tips-to-create-secure-docker-images-for-java-applications/|5 Tips to Create Secure Docker Images for Java Applications | foojay]]   * [[https://foojay.io/today/5-tips-to-create-secure-docker-images-for-java-applications/|5 Tips to Create Secure Docker Images for Java Applications | foojay]]
 +  * [[https://www.baeldung.com/ops/docker-jvm-heap-size|How To Configure Java Heap Size Inside a Docker Container | Baeldung]]
java/openjdk/docker.1609294928.txt.gz · 마지막으로 수정됨: 2020/12/30 11:22 저자 kwon37xi