Skip to content

Commit

Permalink
restore dirty hack for nanoserver
Browse files Browse the repository at this point in the history
  • Loading branch information
lemeurherve committed Apr 28, 2024
1 parent e540c40 commit 8a8e0fc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions entrypoint.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[CmdletBinding()]
Param(
[Parameter(Position = 0, ValueFromRemainingArguments = $true)]
[string] $Cmd
)

& 'C:/Program Files/OpenSSH-Win64/install-sshd.ps1'
& C:/ProgramData/Jenkins/setup-sshd.ps1 $Cmd
3 changes: 2 additions & 1 deletion windows/nanoserver/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ VOLUME "${JENKINS_AGENT_WORK}" "C:/Users/${user}/AppData/Local/Temp"
WORKDIR "${JENKINS_AGENT_WORK}"

COPY setup-sshd.ps1 C:/ProgramData/Jenkins/setup-sshd.ps1
COPY entrypoint.ps1 C:/ProgramData/Jenkins/entrypoint.ps1

EXPOSE 22

Expand All @@ -135,4 +136,4 @@ LABEL `
org.opencontainers.image.source="https://github.com/jenkinsci/docker-ssh-agent" `
org.opencontainers.image.licenses="MIT"

ENTRYPOINT ["pwsh.exe", "-NoExit", "-Command", "& C:/ProgramData/Jenkins/setup-sshd.ps1"]
ENTRYPOINT ["pwsh.exe", "-NoExit", "-Command", "& C:/ProgramData/Jenkins/entrypoint.ps1"]

0 comments on commit 8a8e0fc

Please sign in to comment.