AdoptOpenJDK for Alpine Linux With musl libc
항목. 기존의 temurin docker 이미지는 alpine 에 glibc 라이브러리를 함께 배포하는 거였으나 16 버전부터 musl 을 그대로 사용함. 그러나 그렇다고 해도 musl 에 문제가 없다는 의미는 아님. musl 기반으로 빌드를 했다는 얘기일 뿐.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 Hacker News comment thread for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images.
openjdk:<version>
: Debian 기반openjdk:<version>-alpine
: Alpine Linux 기반FROM openjdk:8-alpine # Timezone 보정 RUN apk add tzdata RUN cp /usr/share/zoneinfo/Asia/Seoul /etc/localtime RUN echo "Asia/Seoul" > /etc/timezone ENV LANG=ko_KR.UTF-8 # Java application 실행 설정 COPY . /usr/src/myapp WORKDIR /usr/src/myapp RUN javac Main.java CMD ["java", "Main"]