This will set up buildkitd natively on Windows Server 2019 (ltsc2019) or Windows Server 2022 (ltsc2022).
This will reboot your server if the feature is not already installed.
Install-WindowsFeature -Name containers -Restart| #!/bin/bash | |
| set -euo pipefail | |
| usage() { | |
| echo "Usage: $0 [--dry-run] [--from-release=TAG] <source_repo_url> <destination_repo_url> <destination_token> <temp_folder>" | |
| echo "" | |
| echo "Options:" | |
| echo " --dry-run Show what would be done without making changes" | |
| echo " --from-release=TAG Sync releases starting from this tag (inclusive). Without this, only sync latest release." |
| { | |
| "enable_boot_debug": true, | |
| "disable_updates": true, | |
| "runner_install_template": "IyEvYmluL2Jhc2gKCnNldCAtZQpzZXQgLW8gcGlwZWZhaWwKCnt7LSBpZiAuRW5hYmxlQm9vdERlYnVnIH19CnNldCAteAp7ey0gZW5kIH19CgpDQUxMQkFDS19VUkw9Int7IC5DYWxsYmFja1VSTCB9fSIKTUVUQURBVEFfVVJMPSJ7eyAuTWV0YWRhdGFVUkwgfX0iCkJFQVJFUl9UT0tFTj0ie3sgLkNhbGxiYWNrVG9rZW4gfX0iCgpSVU5fSE9NRT0iL2hvbWUve3suUnVubmVyVXNlcm5hbWV9fS9hY3QtcnVubmVyIgoKaWYgWyAteiAiJE1FVEFEQVRBX1VSTCIgXTt0aGVuCgllY2hvICJubyB0b2tlbiBpcyBhdmFpbGFibGUgYW5kIE1FVEFEQVRBX1VSTCBpcyBub3Qgc2V0IgoJZXhpdCAxCmZpCgpmdW5jdGlvbiBjYWxsKCkgewoJUEFZTE9BRD0iJDEiCglbWyAkQ0FMTEJBQ0tfVVJMID1+IF4oLiopL3N0YXR1cygvKT8kIF1dIHx8IENBTExCQUNLX1VSTD0iJHtDQUxMQkFDS19VUkx9L3N0YXR1cyIKCWN1cmwgLS1yZXRyeSA1IC0tcmV0cnktZGVsYXkgNSAtLXJldHJ5LWNvbm5yZWZ1c2VkIC0tZmFpbCAtcyAtWCBQT1NUIC1kICIke1BBWUxPQUR9IiAtSCAnQWNjZXB0OiBhcHBsaWNhdGlvbi9qc29uJyAtSCAiQXV0aG9yaXphdGlvbjogQmVhcmVyICR7QkVBUkVSX1RPS0VOfSIgIiR7Q0FMTEJBQ0tfVVJMfSIgfHwgZWNobyAiZmFpbGVkIHRvIGNhbGwgaG9tZTogZXhpdCBjb2RlICgkPykiCn0KCmZ1bmN0aW9uIHN5c3RlbUluZm8oKSB7 |
| #!/bin/bash | |
| set -e | |
| set -o pipefail | |
| {{- if .EnableBootDebug }} | |
| set -x | |
| {{- end }} | |
| CALLBACK_URL="{{ .CallbackURL }}" |
| package main | |
| import ( | |
| "context" | |
| "fmt" | |
| "log" | |
| "os" | |
| "os/signal" | |
| "path/filepath" | |
| "sync/atomic" |
| $ErrorActionPreference="Stop" | |
| $containerdDir = join-path $env:ProgramFiles containerd | |
| if (!(Test-Path $containerdDir)){ | |
| mkdir $containerdDir | |
| } | |
| $downloadPath = Join-Path $env:Tmp "containerd.tar.gz" | |
| $downloadLink = "https://github.com/containerd/containerd/releases/download/v1.7.5/containerd-1.7.5-windows-amd64.tar.gz" |
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "os" | |
| "strings" | |
| "github.com/Microsoft/go-winio" | |
| "golang.org/x/sys/windows" |
| C:\Users\Administrator\work\playground\with-drive-letter>docker build -t docker.samfira.com/volume-copy-up:2.6 . | |
| Sending build context to Docker daemon 5.253MB | |
| Step 1/19 : FROM mcr.microsoft.com/windows/nanoserver:ltsc2022 | |
| ltsc2022: Pulling from windows/nanoserver | |
| 9e0d440fca83: Already exists | |
| Digest: sha256:3bb312dcc36fa551766a13cf2fb8e2be90726774589c96bea9198a26307bf2a2 | |
| Status: Downloaded newer image for mcr.microsoft.com/windows/nanoserver:ltsc2022 | |
| ---> 0c7fb865d8dc | |
| Step 2/19 : ADD https://github.com/kubernetes-sigs/windows-testing/raw/3fea3d48ea8337b2aaca755c1d719e34b45f46b9/images/busybox/busybox.exe /bin/busybox.exe | |
| Downloading [==================================================>] 575kB/575kB |
| # Copyright The containerd Authors. | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, |
Assumptions:
k8s-testObviously you will need to adust these assumptions to your env. But for clarity we define these assumptions here.