Add image build workflow
This change adds a new workflow that builds the volume test images and pushes them to a remote registry. Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
22
script/setup/enable_docker_tls_on_windows.ps1
Normal file
22
script/setup/enable_docker_tls_on_windows.ps1
Normal file
@@ -0,0 +1,22 @@
|
||||
Param(
|
||||
[parameter(Mandatory=$true)]
|
||||
[string[]]$IPAddresses
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$IPAddresses += "127.0.0.1"
|
||||
$IPParams = $IPAddresses -join ","
|
||||
mkdir $env:USERPROFILE\.docker
|
||||
|
||||
docker run --isolation=hyperv --user=ContainerAdministrator --rm `
|
||||
-e SERVER_NAME=$(hostname) `
|
||||
-e IP_ADDRESSES=$IPParams `
|
||||
-v "c:\programdata\docker:c:\programdata\docker" `
|
||||
-v "$env:USERPROFILE\.docker:c:\users\containeradministrator\.docker" stefanscherer/dockertls-windows:2.5.5
|
||||
|
||||
if ($LASTEXITCODE) {
|
||||
Throw "Failed to setup Docker TLS: $LASTEXITCODE"
|
||||
}
|
||||
|
||||
Stop-Service docker
|
||||
Start-Service docker
|
21
script/setup/prepare_windows_docker_helper.ps1
Normal file
21
script/setup/prepare_windows_docker_helper.ps1
Normal file
@@ -0,0 +1,21 @@
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
# Enable Hyper-V and management tools
|
||||
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V,Microsoft-Hyper-V-Management-Clients,Microsoft-Hyper-V-Management-PowerShell -All -NoRestart
|
||||
|
||||
# Enable SSH (this can be skipped if you don't need it)
|
||||
Add-WindowsCapability -Online -Name OpenSSH*
|
||||
|
||||
# Install Docker
|
||||
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force -Confirm:$false
|
||||
Install-Module -Name DockerMsftProvider -Repository PSGallery -Force -Confirm:$false
|
||||
Install-Package -Name docker -ProviderName DockerMsftProvider -Force -Confirm:$false
|
||||
|
||||
# Open SSH port
|
||||
New-NetFirewallRule -Name 'OpenSSH-Server-In-TCP' -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22
|
||||
|
||||
# Open Docker port
|
||||
New-NetFirewallRule -Name 'Docker-TLS-In-TCP' -DisplayName 'Docker (TLS)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 2376
|
||||
|
||||
# Restart
|
||||
Restart-Computer -Force
|
Reference in New Issue
Block a user