Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Bob Tanner
packer-windows
Commits
f67af47e
Commit
f67af47e
authored
Nov 26, 2015
by
Stefan Scherer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add enable-docker-unsecure to open port 2375
parent
1b90dbe4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
scripts/enable-docker-unsecure.ps1
scripts/enable-docker-unsecure.ps1
+14
-0
windows_2016.json
windows_2016.json
+2
-1
No files found.
scripts/enable-docker-unsecure.ps1
0 → 100644
View file @
f67af47e
Write-Host
"WARNING: DO NOT USE DOCKER IN PRODUCTION WITHOUT TLS"
Write-Host
"Enabling Docker unsecure port 2375"
if
(
!
(
Get-NetFirewallRule
|
where
{
$_
.
Name
-eq
"DockerUnsecure2375"
}))
{
New-NetFirewallRule
-Name
"DockerUnsecure2375"
-DisplayName
"Docker unsecure on TCP/2375"
-Protocol
tcp
-LocalPort
2375
-Action
Allow
-Enabled
True
}
Write-Host
"Enabling Docker to listen on unsecure 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
"Restarting Docker"
Stop-Service
docker
Start-Service
docker
windows_2016.json
View file @
f67af47e
...
...
@@ -98,7 +98,8 @@
{
"type"
:
"powershell"
,
"scripts"
:
[
"./scripts/install-docker.ps1"
"./scripts/install-docker.ps1"
,
"./scripts/enable-docker-unsecure.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