Skip to content

Commit b46c292

Browse files
committed
always override
1 parent 8587c76 commit b46c292

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

windows/nanoserver/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,9 @@ USER ContainerAdministrator
5959
ENV PSHOME="C:\Program Files\PowerShell"
6060

6161
# The nanoserver image is nice and small, but we need a couple of things to get SSH working
62+
COPY --from=jdk-core /windows/system32/netapi32.dll /windows/system32/netapi32.dll
6263
COPY --from=jdk-core /windows/system32/whoami.exe /windows/system32/whoami.exe
6364
COPY --from=jdk-core $JAVA_HOME $JAVA_HOME
64-
COPY --from=jdk-core /windows/system32/netapi32.dll $PSHOME/netapi32.dll
65-
RUN If (!(Test-Path 'C:/windows/system32/netapi32.dll') -And (Test-Path "$env:PSHOME/netapi32.dll")) { Move-Item "$env:PSHOME/netapi32.dll" 'C:/windows/system32/netapi32.dll' } Else { Write-Host "No $env:PSHOME/netapi32.dll or windows/system32/netapi32.dll alreay exists" }
66-
RUN If ((Test-Path 'C:/windows/system32/netapi32.dll') -And (Test-Path "$env:PSHOME/netapi32.dll")) { Remove-Item 'C:/windows/system32/netapi32.dll' ; Move-Item "$env:PSHOME/netapi32.dll" 'C:/windows/system32/netapi32.dll' ; Write-Output "netapi32.dll overwritten" }
6765

6866
# Backward compatibility with version <= 5.x: create a symlink to the "new" JAVA_HOME
6967
RUN $javaMajorVersion = $env:JAVA_HOME.Substring($env:JAVA_HOME.Length - 2); `

0 commit comments

Comments
 (0)