Skip to content

Commit

Permalink
remove jlink from wsc, to be added in another PR
Browse files Browse the repository at this point in the history
  • Loading branch information
lemeurherve committed Apr 17, 2024
1 parent 6c74295 commit baab2b7
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions windows/windowsservercore/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,27 +41,13 @@ RUN New-Item -ItemType Directory -Path C:\temp | Out-Null ; `
RUN Write-Host 'javac --version' ; javac --version ; `
Write-Host 'java --version' ; java --version

RUN $version = (jlink --version) ; `
$stripJavaDebugFlags = '--strip-java-debug-attributes' ; `
# jlink version 11 has less features than JDK17+
if ($version.StartsWith('11')) { `
$stripJavaDebugFlags = '--strip-debug' ; `
} `
& jlink `
--add-modules ALL-MODULE-PATH `
$stripJavaDebugFlags `
--no-man-pages `
--no-header-files `
--compress=2 `
--output /javaruntime

## Agent image target
FROM mcr.microsoft.com/windows/servercore:"${WINDOWS_VERSION_TAG}" AS agent

ARG JAVA_HOME="C:\openjdk-17"
ENV JAVA_HOME=${JAVA_HOME}

COPY --from=jdk-core /javaruntime $JAVA_HOME
COPY --from=jdk-core $JAVA_HOME $JAVA_HOME

SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

Expand Down

0 comments on commit baab2b7

Please sign in to comment.