For installing java 8 in any alpine image you need to replace https
by http
in file /etc/apk/repositories
FROM anyImage:alpine
RUN apk update && \
sed -i 's/https/http/' /etc/apk/repositories && \
apk update && \
apk add openjdk8-jre