Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions hacks/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
private/
bin/
12 changes: 12 additions & 0 deletions hacks/scripts/dockerfiles/nanoserver_plus/dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM mcr.microsoft.com/windows/nanoserver:ltsc2022

# this is a minimal image based on nanoserver
# mainly for the purpose of testing, e.g. integration
# tests on moby/buildkit.

# before building the image, run ./get_binaries.ps1
# from the host. This dumps all the required binaries
# in the ./bin directory that is later moved to
# C:\Windows\system32 to be accessed within %PATH%

COPY ./bin/* /Windows/System32/
18 changes: 18 additions & 0 deletions hacks/scripts/dockerfiles/nanoserver_plus/get_binaries.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

# files to copy from Windows host.
# this are mainly legacy binaries that don't have any
# extra dependencies.
$filePaths = @(
"C:\Windows\System32\fc.exe",
"C:\Windows\System32\whoami.exe"
)

$dest = "./bin"

if (-not (Test-Path -Path $dest)) {
New-Item -ItemType Directory -Path $dest
}

foreach ($filePath in $filePaths) {
Copy-Item -Path $filePath -Destination $dest
}