mirror of
https://github.com/tiennm99/docker-images.git
synced 2026-10-13 14:16:11 +00:00
Convention B (Docker-Hub-style <service>:<full-version>) mirrors the just-shipped couchbase rename. Workflow images/tags/subject-name flip from oraclejdk-8 to oraclejdk; 8 major-line alias added. Both metadata-action labels: block and Dockerfile LABEL lines carry the same 5 OCI image-spec keys so manual and CI builds match. License: LicenseRef-Oracle-BCL (Oracle Binary Code License covered 8u201 binaries; SPDX has no exact identifier, custom ref is the compliant escape hatch).
38 lines
1.5 KiB
Docker
38 lines
1.5 KiB
Docker
FROM centos:7
|
|
|
|
LABEL maintainer="miti99 <tiennm99@outlook.com>"
|
|
LABEL org.opencontainers.image.title="Oracle JDK 8"
|
|
LABEL org.opencontainers.image.description="Legacy Oracle JDK 8u201 (archived Oracle build, no upstream OCI image)"
|
|
LABEL org.opencontainers.image.version="8u201"
|
|
LABEL org.opencontainers.image.source="https://www.oracle.com/java/technologies/javase/javase8-archive-downloads.html"
|
|
LABEL org.opencontainers.image.licenses="LicenseRef-Oracle-BCL"
|
|
|
|
ENV LANG=en_US.UTF-8
|
|
ENV JAVA_HOME=/usr/java/jdk-8
|
|
ENV PATH=$JAVA_HOME/bin:$PATH
|
|
ENV JAVA_URL=https://repo.huaweicloud.com/java/jdk/8u201-b09/
|
|
|
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|
RUN set -eux; \
|
|
ARCH="$(uname -m)" && \
|
|
if [ "$ARCH" = "x86_64" ]; \
|
|
then \
|
|
JAVA_PKG="$JAVA_URL"jdk-8u201-linux-x64.tar.gz; \
|
|
else \
|
|
JAVA_PKG="$JAVA_URL"jdk-8u201-linux-i586.tar.gz; \
|
|
fi && \
|
|
JAVA_SHA256="$(curl -L "$JAVA_PKG".sha256)" ; \
|
|
curl -L --output /tmp/jdk.tar.gz "$JAVA_PKG" && \
|
|
echo "$JAVA_SHA256" */tmp/jdk.tar.gz | sha256sum -c -; \
|
|
mkdir -p "$JAVA_HOME"; \
|
|
tar --extract --file /tmp/jdk.tar.gz --directory "$JAVA_HOME" --strip-components 1 && \
|
|
rm -f /tmp/jdk.tar.gz; \
|
|
ln -sfT "$JAVA_HOME" /usr/java/default; \
|
|
ln -sfT "$JAVA_HOME" /usr/java/latest; \
|
|
for bin in "$JAVA_HOME/bin/"*; do \
|
|
base="$(basename "$bin")"; \
|
|
[ ! -e "/usr/bin/$base" ]; \
|
|
alternatives --install "/usr/bin/$base" "$base" "$bin" 20000; \
|
|
done; \
|
|
java -Xshare:dump;
|