Alpine with jdk11 as base docker image
I have a base Dockerfile
used by a bunch of services, looking like this:
FROM adoptopenjdk/openjdk11:jdk-11.0.11_9-alpine-slim
There were some security fixes for Linux Alpine, and I'd like to include them in my base image. Looking for a new image on AdoptOpenJDK's official page, I've found that these tags are deprecated as of 1st August 2021 in favour of the Eclipse Temurin project.
Eclipse Temurin does not have an alpine-based jdk11 image. Do I...
- Use the 11-jdk-focal from Temurin?
- Build my own alpine image and add jdk11 to it?
- Use any other alternative provider?
References:
- How to install oracle jdk11 in Alpine linux docker image?
- Installing openjdk 11 on alpine:3.9
Update Jan 2020
Eclipse Temurin has launched alpine versions. :)
https://hub.docker.com/_/eclipse-temurin?tab=tags&page=1&name=alpine
My solution for now is to use alpine as base image and install openjdk with apk, as explained here -> https://stackoverflow.com/a/68459967/1774643
FROM alpine:3.14
RUN apk update \
&& apk upgrade \
&& apk add --update openjdk11 tzdata curl unzip bash \
&& rm -rf /var/cache/apk/*