2022-05-31 19:42:53 +03:00
|
|
|
# Copyright (c) Microsoft Corporation
|
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
|
2023-01-25 23:48:55 +03:00
|
|
|
# Download and copy release archive to local directory as ./ebpf-for-windows.msi before running this script.
|
2023-02-01 23:43:58 +03:00
|
|
|
|
2022-05-31 19:42:53 +03:00
|
|
|
param ([parameter(Mandatory=$false)][string] $TEMPDir = "c:\temp",
|
|
|
|
[parameter(Mandatory=$true)][string] $Repository = "",
|
|
|
|
[parameter(Mandatory=$true)][string] $Tag = "",
|
|
|
|
[parameter(Mandatory=$true)][string] $OSVersion = "1809")
|
|
|
|
|
|
|
|
$svc = Get-Service | where Name -EQ 'docker'
|
|
|
|
if ($svc -EQ $null) {
|
|
|
|
throw "Docker service is not installed."
|
|
|
|
}
|
|
|
|
if ($svc.Status -NE 'Running') {
|
|
|
|
throw "Docker service is not running."
|
|
|
|
}
|
|
|
|
|
|
|
|
docker build -t $Repository/ebpfwin-install:$Tag -f .\Dockerfile.install --build-arg WINDOWS_VERSION=$OSVersion .
|