Skip to content
This repository was archived by the owner on Feb 27, 2018. It is now read-only.

Commit 879d57e

Browse files
Sven DowideitSven Dowideit
authored andcommitted
Merge pull request #141 from SvenDowideit/docker-port-change
change from using port 4243 to 2375 - this is incompatible with previous Boot2Docker ISO's
2 parents a088ba4 + 62357e0 commit 879d57e

5 files changed

Lines changed: 10 additions & 7 deletions

File tree

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ login via SSH.
99
On Windows, [MSYS SSH](http://www.mingw.org/) provides a first class way to
1010
connect to the boot2docker VM using `boot2docker.exe ssh`.
1111

12+
> **Note:** Docker now has an [IANA registered IP Port: 2375]( http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=docker)
13+
> , so the use of port 4243 is deprecated. This also means that new Boot2Docker
14+
> ISO releases and management tool are not compatible.
1215
1316
## Installation
1417

@@ -142,8 +145,8 @@ Memory = 1024
142145
# host port forwarding to port 22 in the VM
143146
SSHPort = 2022
144147

145-
# host port forwarding to port 4243 in the VM
146-
DockerPort = 4243
148+
# host port forwarding to port 2375 in the VM
149+
DockerPort = 2375
147150

148151
# host-only network host IP
149152
HostIP = "192.168.59.3"

cmds.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func cmdInit() int {
106106

107107
pfRules := map[string]vbx.PFRule{
108108
"ssh": vbx.PFRule{Proto: vbx.PFTCP, HostIP: net.ParseIP("127.0.0.1"), HostPort: B2D.SSHPort, GuestPort: 22},
109-
"docker": vbx.PFRule{Proto: vbx.PFTCP, HostIP: net.ParseIP("127.0.0.1"), HostPort: B2D.DockerPort, GuestPort: 4243},
109+
"docker": vbx.PFRule{Proto: vbx.PFTCP, HostIP: net.ParseIP("127.0.0.1"), HostPort: B2D.DockerPort, GuestPort: 2375},
110110
}
111111

112112
for name, rule := range pfRules {

config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ var B2D struct {
3636

3737
// NAT network: port forwarding
3838
SSHPort uint16 // host SSH port (forward to port 22 in VM)
39-
DockerPort uint16 // host Docker port (forward to port 4243 in VM)
39+
DockerPort uint16 // host Docker port (forward to port 2375 in VM)
4040

4141
// host-only network
4242
HostIP net.IP
@@ -124,7 +124,7 @@ func config() (*flag.FlagSet, error) {
124124
flags.UintVarP(&B2D.DiskSize, "disksize", "s", 20000, "boot2docker disk image size (in MB).")
125125
flags.UintVarP(&B2D.Memory, "memory", "m", 1024, "virtual machine memory size (in MB).")
126126
flags.Uint16Var(&B2D.SSHPort, "sshport", 2022, "host SSH port (forward to port 22 in VM).")
127-
flags.Uint16Var(&B2D.DockerPort, "dockerport", 4243, "host Docker port (forward to port 4243 in VM).")
127+
flags.Uint16Var(&B2D.DockerPort, "dockerport", 2375, "host Docker port (forward to port 2375 in VM).")
128128
flags.IPVar(&B2D.HostIP, "hostip", net.ParseIP("192.168.59.3"), "VirtualBox host-only network IP address.")
129129
flags.IPMaskVar(&B2D.NetMask, "netmask", flag.ParseIPv4Mask("255.255.255.0"), "VirtualBox host-only network mask.")
130130
flags.BoolVar(&B2D.DHCPEnabled, "dhcp", true, "enable VirtualBox host-only network DHCP.")

release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ set -e
88
TMP=$(mktemp -d /tmp/b2d-cli.XXXXXX)
99
echo Building in $TMP
1010
export GOPATH=$TMP
11-
export DOCKER_HOST=tcp://localhost:4243
11+
export DOCKER_HOST=tcp://localhost:2375
1212
go get github.com/boot2docker/boot2docker-cli
1313
cd ${TMP}/src/github.com/boot2docker/boot2docker-cli
1414

virtualbox/machine.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ func GetMachine(id string) (*Machine, error) {
236236
m.CfgFile = val
237237
m.BaseFolder = filepath.Dir(val)
238238
case "Forwarding(0)":
239-
// Forwarding(0)="docker,tcp,127.0.0.1,5555,,4243"
239+
// Forwarding(0)="docker,tcp,127.0.0.1,5555,,"
240240
vals := strings.Split(val, ",")
241241
n, err := strconv.ParseUint(vals[3], 10, 32)
242242
if err != nil {

0 commit comments

Comments
 (0)