Commit 4fddf51e authored by Stefan Scherer's avatar Stefan Scherer

Add user vagrant to docker group

parent e9f40118
net localgroup docker /add
net localgroup docker vagrant /add
(Get-Content C:\ProgramData\docker\runDockerDaemon.cmd).replace('-H npipe://', '-G docker -H npipe://') | Set-Content C:\ProgramData\docker\runDockerDaemon.cmd
# restart-service docker
# logoff and logon again
......@@ -7,14 +7,4 @@ if (!(Get-NetFirewallRule | where {$_.Name -eq "Dockerinsecure2375"})) {
Write-Host "Enabling Docker to listen on insecure port 2375"
cp C:\ProgramData\docker\runDockerDaemon.cmd C:\ProgramData\docker\runDockerDaemon.cmd.bak
cat C:\ProgramData\docker\runDockerDaemon.cmd.bak | %{$_ -replace '^docker daemon -D -b "Virtual Switch"$','docker daemon -D -b "Virtual Switch" -H 0.0.0.0:2375'} | Set-Content C:\ProgramData\docker\runDockerDaemon.cmd
Write-Host "Stopping Docker"
Stop-Service docker
# Do not restart Docker as it creates the key.json with an unique ID
# This should not exist in the Vagrant basebox so you can spin up
# multiple Vagrant boxes for a Docker swarm etc.
Write-Host "Removing key.json to recreate key.json on first vagrant up"
rm C:\ProgramData\docker\config\key.json
cat C:\ProgramData\docker\runDockerDaemon.cmd.bak | %{$_ -replace '^dockerd -H npipe://$','dockerd -H npipe:// -H 0.0.0.0:2375'} | Set-Content C:\ProgramData\docker\runDockerDaemon.cmd
......@@ -5,7 +5,6 @@ wget https://aka.ms/tp5/Update-Container-Host -OutFile c:\update-containerhost.p
Install-PackageProvider ContainerImage -Force
# create a Task Scheduler task which is also able to run in battery mode due
# to host notebooks working in battery mode.
......
# Do not restart Docker as it creates the key.json with an unique ID
# This should not exist in the Vagrant basebox so you can spin up
# multiple Vagrant boxes for a Docker swarm etc.
Write-Host "Stopping Docker"
Stop-Service docker
Write-Host "Removing key.json to recreate key.json on first vagrant up"
rm C:\ProgramData\docker\config\key.json
......@@ -101,9 +101,11 @@
{
"type": "powershell",
"scripts": [
"./scripts/install-docker.ps1",
"./scripts/patch-boot-time-for-containers.ps1",
"./scripts/enable-docker-insecure.ps1"
"./scripts/docker/install-docker.ps1",
"./scripts/docker/patch-boot-time-for-containers.ps1",
"./scripts/docker/enable-docker-insecure.ps1",
"./scripts/docker/add-docker-group.ps1",
"./scripts/docker/remove-docker-key-json.ps1"
]
},
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment