forked from docker-library/openjdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-adopt-windows-nanoserver.template
33 lines (27 loc) · 1.38 KB
/
Dockerfile-adopt-windows-nanoserver.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
FROM placeholder
SHELL ["cmd", "/s", "/c"]
ENV JAVA_HOME placeholder
# "ERROR: Access to the registry path is denied."
USER ContainerAdministrator
RUN echo Updating PATH: %JAVA_HOME%\bin;%PATH% \
&& setx /M PATH %JAVA_HOME%\bin;%PATH%
USER ContainerUser
# https://adoptopenjdk.net/upstream.html
# >
# > What are these binaries?
# >
# > These binaries are built by Red Hat on their infrastructure on behalf of the OpenJDK jdk8u and jdk11u projects. The binaries are created from the unmodified source code at OpenJDK. Although no formal support agreement is provided, please report any bugs you may find to https://bugs.java.com/.
# >
ENV JAVA_VERSION placeholder
# https://github.com/docker-library/openjdk/issues/320#issuecomment-494050246
# >
# > I am the OpenJDK 8 and 11 Updates OpenJDK project lead.
# > ...
# > While it is true that the OpenJDK Governing Board has not sanctioned those releases, they (or rather we, since I am a member) didn't sanction Oracle's OpenJDK releases either. As far as I am aware, the lead of an OpenJDK project is entitled to release binary builds, and there is clearly a need for them.
# >
COPY --from=%%SERVERCORE-IMAGE%% $JAVA_HOME $JAVA_HOME
RUN echo Verifying install ... \
&& echo javac --version && javac --version \
&& echo java --version && java --version
# "jshell" is an interactive REPL for Java (see https://en.wikipedia.org/wiki/JShell)
CMD ["jshell"]