Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix linting errors
  • Loading branch information
zZHorizonZz committed Sep 9, 2024
commit 48e25c2b8571fb6b4d1183c793f4e8778a9be12b
20 changes: 10 additions & 10 deletions 22/windows-2019/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPref

# PATH isn't actually set in the Docker image, so we have to set it from within the container
RUN $newPath = ('C:\Program Files (x86)\GnuPG\bin;{0}' -f $env:PATH); \
Write-Host ('Updating PATH: {0}' -f $newPath); \
[Environment]::SetEnvironmentVariable('PATH', $newPath, [EnvironmentVariableTarget]::Machine)
Write-Host ('Updating PATH: {0}' -f $newPath); \
[Environment]::SetEnvironmentVariable('PATH', $newPath, [EnvironmentVariableTarget]::Machine)
# doing this first to share cache across versions more aggressively

ENV NODE_VERSION 22.8.0
Expand All @@ -17,8 +17,8 @@ ENV GPG_CHECKSUM d2ac821ceacf9409ebcdb42ae330087ada30c732981f00b356f9c2f08fac4dc

RUN Invoke-WebRequest $('https://www.gnupg.org/ftp/gcrypt/binary/gnupg-w32-{0}.exe' -f $env:GPG_VERSION) -OutFile 'gpg-installer.exe'; \
if ((Get-FileHash gpg-installer.exe -Algorithm sha256).Hash -ne $env:GPG_CHECKSUM) { Write-Error 'GPG checksum mismatch' }; \
Start-Process -FilePath 'gpg-installer.exe' -ArgumentList '/S' -Wait; \
gpg --version;
Start-Process -FilePath 'gpg-installer.exe' -ArgumentList '/S' -Wait; \
gpg --version;

RUN @( \
'4ED778F539E3634C779C87C6D7062848A1AB005C', \
Expand Down Expand Up @@ -56,12 +56,12 @@ COPY --from=installer C:/nodejs C:/nodejs
COPY docker-entrypoint.ps1 C:/docker-entrypoint.ps1

RUN $newPath = ('C:\nodejs;{0}' -f $env:PATH); \
Write-Host ('Updating PATH: {0}' -f $newPath); \
[Environment]::SetEnvironmentVariable('PATH', $newPath, [EnvironmentVariableTarget]::Machine); \
# Because we need to use it in the current session
$env:PATH = $newPath; \
node --version; \
npm --version;
Write-Host ('Updating PATH: {0}' -f $newPath); \
[Environment]::SetEnvironmentVariable('PATH', $newPath, [EnvironmentVariableTarget]::Machine); \
# Because we need to use it in the current session
$env:PATH = $newPath; \
node --version; \
npm --version;

ENTRYPOINT [ "powershell.exe" , "C:/docker-entrypoint.ps1" ]

Expand Down
6 changes: 3 additions & 3 deletions 22/windows-2019/docker-entrypoint.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ $ErrorActionPreference = 'Stop'
# 1. Contains a "-"
# 2. Is NOT a recognized command
# 3. Is a file that's NOT executable
if (($args[0] -like '*-') -or
if (($args[0] -like '*-') -or
(!(Get-Command $args[0] -ErrorAction SilentlyContinue)) -or
(((Test-Path $args[0] -PathType Leaf)) -and -not ((Get-Item $args[0]).Attributes -band 'ReadOnly'))) {
(((Test-Path $args[0] -PathType Leaf)) -and -not ((Get-Item $args[0]).Attributes -band 'ReadOnly'))) {
# Prepend 'node' to the argument list
$args = @('node') + $args
}

# Execute the (potentially modified) command
& $args[0] $args[1..($args.Length-1)]
& $args[0] $args[1..($args.Length-1)]
20 changes: 10 additions & 10 deletions 22/windows-2022/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPref

# PATH isn't actually set in the Docker image, so we have to set it from within the container
RUN $newPath = ('C:\Program Files (x86)\GnuPG\bin;{0}' -f $env:PATH); \
Write-Host ('Updating PATH: {0}' -f $newPath); \
[Environment]::SetEnvironmentVariable('PATH', $newPath, [EnvironmentVariableTarget]::Machine)
Write-Host ('Updating PATH: {0}' -f $newPath); \
[Environment]::SetEnvironmentVariable('PATH', $newPath, [EnvironmentVariableTarget]::Machine)
# doing this first to share cache across versions more aggressively

ENV NODE_VERSION 22.8.0
Expand All @@ -17,8 +17,8 @@ ENV GPG_CHECKSUM d2ac821ceacf9409ebcdb42ae330087ada30c732981f00b356f9c2f08fac4dc

RUN Invoke-WebRequest $('https://www.gnupg.org/ftp/gcrypt/binary/gnupg-w32-{0}.exe' -f $env:GPG_VERSION) -OutFile 'gpg-installer.exe'; \
if ((Get-FileHash gpg-installer.exe -Algorithm sha256).Hash -ne $env:GPG_CHECKSUM) { Write-Error 'GPG checksum mismatch' }; \
Start-Process -FilePath 'gpg-installer.exe' -ArgumentList '/S' -Wait; \
gpg --version;
Start-Process -FilePath 'gpg-installer.exe' -ArgumentList '/S' -Wait; \
gpg --version;

RUN @( \
'4ED778F539E3634C779C87C6D7062848A1AB005C', \
Expand Down Expand Up @@ -56,12 +56,12 @@ COPY --from=installer C:/nodejs C:/nodejs
COPY docker-entrypoint.ps1 C:/docker-entrypoint.ps1

RUN $newPath = ('C:\nodejs;{0}' -f $env:PATH); \
Write-Host ('Updating PATH: {0}' -f $newPath); \
[Environment]::SetEnvironmentVariable('PATH', $newPath, [EnvironmentVariableTarget]::Machine); \
# Because we need to use it in the current session
$env:PATH = $newPath; \
node --version; \
npm --version;
Write-Host ('Updating PATH: {0}' -f $newPath); \
[Environment]::SetEnvironmentVariable('PATH', $newPath, [EnvironmentVariableTarget]::Machine); \
# Because we need to use it in the current session
$env:PATH = $newPath; \
node --version; \
npm --version;

ENTRYPOINT [ "powershell.exe" , "C:/docker-entrypoint.ps1" ]

Expand Down
6 changes: 3 additions & 3 deletions 22/windows-2022/docker-entrypoint.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ $ErrorActionPreference = 'Stop'
# 1. Contains a "-"
# 2. Is NOT a recognized command
# 3. Is a file that's NOT executable
if (($args[0] -like '*-') -or
if (($args[0] -like '*-') -or
(!(Get-Command $args[0] -ErrorAction SilentlyContinue)) -or
(((Test-Path $args[0] -PathType Leaf)) -and -not ((Get-Item $args[0]).Attributes -band 'ReadOnly'))) {
(((Test-Path $args[0] -PathType Leaf)) -and -not ((Get-Item $args[0]).Attributes -band 'ReadOnly'))) {
# Prepend 'node' to the argument list
$args = @('node') + $args
}

# Execute the (potentially modified) command
& $args[0] $args[1..($args.Length-1)]
& $args[0] $args[1..($args.Length-1)]
22 changes: 11 additions & 11 deletions Dockerfile-windows.template
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPref

# PATH isn't actually set in the Docker image, so we have to set it from within the container
RUN $newPath = ('C:\Program Files (x86)\GnuPG\bin;{0}' -f $env:PATH); \
Write-Host ('Updating PATH: {0}' -f $newPath); \
[Environment]::SetEnvironmentVariable('PATH', $newPath, [EnvironmentVariableTarget]::Machine)
Write-Host ('Updating PATH: {0}' -f $newPath); \
[Environment]::SetEnvironmentVariable('PATH', $newPath, [EnvironmentVariableTarget]::Machine)
# doing this first to share cache across versions more aggressively

ENV NODE_VERSION 0.0.0
Expand All @@ -16,9 +16,9 @@ ENV GPG_VERSION 2.4.5_20240307
ENV GPG_CHECKSUM d2ac821ceacf9409ebcdb42ae330087ada30c732981f00b356f9c2f08fac4dc1

RUN Invoke-WebRequest $('https://www.gnupg.org/ftp/gcrypt/binary/gnupg-w32-{0}.exe' -f $env:GPG_VERSION) -OutFile 'gpg-installer.exe'; \
if ((Get-FileHash gpg-installer.exe -Algorithm sha256).Hash -ne $env:GPG_CHECKSUM) { Write-Error 'GPG checksum mismatch' }; \
Start-Process -FilePath 'gpg-installer.exe' -ArgumentList '/S' -Wait; \
gpg --version;
if ((Get-FileHash gpg-installer.exe -Algorithm sha256).Hash -ne $env:GPG_CHECKSUM) { Write-Error 'GPG checksum mismatch' }; \
Start-Process -FilePath 'gpg-installer.exe' -ArgumentList '/S' -Wait; \
gpg --version;

RUN @( \
"${NODE_KEYS[@]}"
Expand All @@ -45,12 +45,12 @@ COPY --from=installer C:/nodejs C:/nodejs
COPY docker-entrypoint.ps1 C:/docker-entrypoint.ps1
Comment thread
zZHorizonZz marked this conversation as resolved.
Outdated

RUN $newPath = ('C:\nodejs;{0}' -f $env:PATH); \
Write-Host ('Updating PATH: {0}' -f $newPath); \
[Environment]::SetEnvironmentVariable('PATH', $newPath, [EnvironmentVariableTarget]::Machine); \
# Because we need to use it in the current session
$env:PATH = $newPath; \
node --version; \
npm --version;
Write-Host ('Updating PATH: {0}' -f $newPath); \
[Environment]::SetEnvironmentVariable('PATH', $newPath, [EnvironmentVariableTarget]::Machine); \
# Because we need to use it in the current session
$env:PATH = $newPath; \
node --version; \
npm --version;

ENTRYPOINT [ "powershell.exe" , "C:/docker-entrypoint.ps1" ]

Expand Down
2 changes: 1 addition & 1 deletion architectures
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ arm32v7 alpine3.19,alpine3.20,bookworm,bookworm-slim,bullseye,bullseye-sl
arm64v8 alpine3.19,alpine3.20,bookworm,bookworm-slim,bullseye,bullseye-slim
i386 alpine3.19,alpine3.20
ppc64le alpine3.19,alpine3.20,bookworm,bookworm-slim,bullseye,bullseye-slim
s390x alpine3.19,alpine3.20,bookworm,bookworm-slim,bullseye,bullseye-slim
s390x alpine3.19,alpine3.20,bookworm,bookworm-slim,bullseye,bullseye-slim
6 changes: 3 additions & 3 deletions docker-entrypoint.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ $ErrorActionPreference = 'Stop'
# 1. Contains a "-"
# 2. Is NOT a recognized command
# 3. Is a file that's NOT executable
if (($args[0] -like '*-') -or
if (($args[0] -like '*-') -or
(!(Get-Command $args[0] -ErrorAction SilentlyContinue)) -or
(((Test-Path $args[0] -PathType Leaf)) -and -not ((Get-Item $args[0]).Attributes -band 'ReadOnly'))) {
(((Test-Path $args[0] -PathType Leaf)) -and -not ((Get-Item $args[0]).Attributes -band 'ReadOnly'))) {
# Prepend 'node' to the argument list
$args = @('node') + $args
}

# Execute the (potentially modified) command
& $args[0] $args[1..($args.Length-1)]
& $args[0] $args[1..($args.Length-1)]