Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Bob Tanner
packer-windows
Commits
4fddf51e
Commit
4fddf51e
authored
May 01, 2016
by
Stefan Scherer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add user vagrant to docker group
parent
e9f40118
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
15 deletions
+22
-15
scripts/docker/add-docker-group.ps1
scripts/docker/add-docker-group.ps1
+7
-0
scripts/docker/enable-docker-insecure.ps1
scripts/docker/enable-docker-insecure.ps1
+1
-11
scripts/docker/install-docker.ps1
scripts/docker/install-docker.ps1
+0
-1
scripts/docker/patch-boot-time-for-containers.ps1
scripts/docker/patch-boot-time-for-containers.ps1
+0
-0
scripts/docker/remove-docker-key-json.ps1
scripts/docker/remove-docker-key-json.ps1
+9
-0
windows_2016_docker.json
windows_2016_docker.json
+5
-3
No files found.
scripts/docker/add-docker-group.ps1
0 → 100644
View file @
4fddf51e
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
scripts/enable-docker-insecure.ps1
→
scripts/
docker/
enable-docker-insecure.ps1
View file @
4fddf51e
...
...
@@ -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
scripts/install-docker.ps1
→
scripts/
docker/
install-docker.ps1
View file @
4fddf51e
...
...
@@ -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.
...
...
scripts/patch-boot-time-for-containers.ps1
→
scripts/
docker/
patch-boot-time-for-containers.ps1
View file @
4fddf51e
File moved
scripts/docker/remove-docker-key-json.ps1
0 → 100644
View file @
4fddf51e
# 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
windows_2016_docker.json
View file @
4fddf51e
...
...
@@ -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"
]
},
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment