Skip to content

Commit

Permalink
IANA allocated Docker port: 2375
Browse files Browse the repository at this point in the history
2375/2376 are assigned:
http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=docker

For #1440

Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
  • Loading branch information
SvenDowideit committed Jun 3, 2014
1 parent 2f514fb commit 5febba9
Show file tree
Hide file tree
Showing 24 changed files with 45 additions and 45 deletions.
6 changes: 3 additions & 3 deletions contrib/man/md/docker.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ To see the man page for a command run **man docker <command>**.
**-D**=*true*|*false*
Enable debug mode. Default is false.

**-H**, **--host**=[unix:///var/run/docker.sock]: tcp://[host[:port]] to bind or
**-H**, **--host**=[unix:///var/run/docker.sock]: tcp://[host:port] to bind or
unix://[/path/to/socket] to use.
Enable both the socket support and TCP on localhost. When host=[0.0.0.0],
port=[4243] or path =[/var/run/docker.sock] is omitted, default values are used.
The socket(s) to bind to in daemon mode specified using one or more
tcp://host:port, unix:///path/to/socket, fd://* or fd://socketfd.

**--api-enable-cors**=*true*|*false*
Enable CORS headers in the remote API. Default is false.
Expand Down
2 changes: 1 addition & 1 deletion contrib/man/old-man/docker.1
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ To see the man page for a command run \fBman docker <command>\fR.
Enable debug mode
.TP
.B\-H=[unix:///var/run/docker.sock]: tcp://[host[:port]] to bind or unix://[/path/to/socket] to use.
When host=[0.0.0.0], port=[4243] or path
When host=[0.0.0.0], port=[2375] or path
=[/var/run/docker.sock] is omitted, default values are used.
.TP
.B \-\-api-enable-cors=false
Expand Down
8 changes: 4 additions & 4 deletions contrib/vagrant-docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,20 @@ stop on runlevel [!2345]
respawn
script
/usr/bin/docker -d -H=tcp://0.0.0.0:4243
/usr/bin/docker -d -H=tcp://0.0.0.0:2375
end script
```

Once that's done, you need to set up a SSH tunnel between your host machine and the vagrant machine that's running Docker. This can be done by running the following command in a host terminal:

```
ssh -L 4243:localhost:4243 -p 2222 vagrant@localhost
ssh -L 2375:localhost:2375 -p 2222 vagrant@localhost
```

(The first 4243 is what your host can connect to, the second 4243 is what port Docker is running on in the vagrant machine, and the 2222 is the port Vagrant is providing for SSH. If VirtualBox is the VM you're using, you can see what value "2222" should be by going to: Network > Adapter 1 > Advanced > Port Forwarding in the VirtualBox GUI.)
(The first 2375 is what your host can connect to, the second 2375 is what port Docker is running on in the vagrant machine, and the 2222 is the port Vagrant is providing for SSH. If VirtualBox is the VM you're using, you can see what value "2222" should be by going to: Network > Adapter 1 > Advanced > Port Forwarding in the VirtualBox GUI.)

Note that because the port has been changed, to run docker commands from within the command line you must run them like this:

```
sudo docker -H 0.0.0.0:4243 < commands for docker >
sudo docker -H 0.0.0.0:2375 < commands for docker >
```
10 changes: 5 additions & 5 deletions docs/sources/articles/basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ image cache.
With `-H` it is possible to make the Docker daemon to listen on a
specific IP and port. By default, it will listen on
`unix:///var/run/docker.sock` to allow only local connections by the
*root* user. You *could* set it to `0.0.0.0:4243` or a specific host IP
*root* user. You *could* set it to `0.0.0.0:2375` or a specific host IP
to give access to everybody, but that is **not recommended** because
then it is trivial for someone to gain root access to the host where the
daemon is running.
Expand All @@ -74,8 +74,8 @@ Similarly, the Docker client can use `-H` to connect to a custom port.

For example:

- `tcp://host:4243` -> TCP connection on
host:4243
- `tcp://host:2375` -> TCP connection on
host:2375
- `unix://path/to/socket` -> Unix socket located
at `path/to/socket`

Expand All @@ -98,11 +98,11 @@ You can use multiple `-H`, for example, if you want to listen on both
TCP and a Unix socket

# Run docker in daemon mode
$ sudo <path to>/docker -H tcp://127.0.0.1:4243 -H unix:///var/run/docker.sock -d &
$ sudo <path to>/docker -H tcp://127.0.0.1:2375 -H unix:///var/run/docker.sock -d &
# Download an ubuntu image, use default Unix socket
$ sudo docker pull ubuntu
# OR use the TCP port
$ sudo docker -H tcp://127.0.0.1:4243 pull ubuntu
$ sudo docker -H tcp://127.0.0.1:2375 pull ubuntu

## Starting a long-running worker process

Expand Down
4 changes: 2 additions & 2 deletions docs/sources/articles/https.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ Now you can make the Docker daemon only accept connections from clients
providing a certificate trusted by our CA:

$ sudo docker -d --tlsverify --tlscacert=ca.pem --tlscert=server-cert.pem --tlskey=server-key.pem \
-H=0.0.0.0:4243
-H=0.0.0.0:2375

To be able to connect to Docker and validate its certificate, you now
need to provide your client keys, certificates and trusted CA:

$ docker --tlsverify --tlscacert=ca.pem --tlscert=client-cert.pem --tlskey=client-key.pem \
-H=dns-name-of-docker-host:4243
-H=dns-name-of-docker-host:2375

> **Warning**:
> As shown in the example above, you don't have to run the
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/installation/mac.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ virtual machine and run the Docker daemon.
```
boot2docker init
boot2docker start
export DOCKER_HOST=tcp://localhost:4243
export DOCKER_HOST=tcp://localhost:2375
```

`boot2docker init` will ask you to enter an ssh key passphrase - the simplest
Expand Down
4 changes: 2 additions & 2 deletions docs/sources/installation/ubuntulinux.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,9 @@ Then reload UFW:

UFW's default set of rules denies all incoming traffic. If you want to
be able to reach your containers from another host then you should allow
incoming connections on the Docker port (default 4243):
incoming connections on the Docker port (default 2375):

$ sudo ufw allow 4243/tcp
$ sudo ufw allow 2375/tcp

## Docker and local DNS server warnings

Expand Down
2 changes: 1 addition & 1 deletion docs/sources/reference/api/docker_remote_api_v1.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ page_keywords: API, Docker, rcli, REST, documentation
# 1. Brief introduction

- The Remote API is replacing rcli
- Default port in the docker daemon is 4243
- Default port in the docker daemon is 2375
- The API tends to be REST, but for some complex commands, like attach
or pull, the HTTP connection is hijacked to transport stdout stdin
and stderr
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/reference/api/docker_remote_api_v1.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ page_keywords: API, Docker, rcli, REST, documentation
# 1. Brief introduction

- The Remote API is replacing rcli
- Default port in the docker daemon is 4243
- Default port in the docker daemon is 2375
- The API tends to be REST, but for some complex commands, like attach
or pull, the HTTP connection is hijacked to transport stdout stdin
and stderr
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/reference/api/docker_remote_api_v1.10.md
Original file line number Diff line number Diff line change
Expand Up @@ -1297,4 +1297,4 @@ stdout and stderr on the same socket. This might change in the future.
To enable cross origin requests to the remote api add the flag
"–api-enable-cors" when running docker in daemon mode.

$ docker -d -H="192.168.1.9:4243" --api-enable-cors
$ docker -d -H="192.168.1.9:2375" --api-enable-cors
2 changes: 1 addition & 1 deletion docs/sources/reference/api/docker_remote_api_v1.11.md
Original file line number Diff line number Diff line change
Expand Up @@ -1358,4 +1358,4 @@ stdout and stderr on the same socket. This might change in the future.
To enable cross origin requests to the remote api add the flag
"–api-enable-cors" when running docker in daemon mode.

$ docker -d -H="192.168.1.9:4243" --api-enable-cors
$ docker -d -H="192.168.1.9:2375" --api-enable-cors
2 changes: 1 addition & 1 deletion docs/sources/reference/api/docker_remote_api_v1.12.md
Original file line number Diff line number Diff line change
Expand Up @@ -1370,4 +1370,4 @@ stdout and stderr on the same socket. This might change in the future.
To enable cross origin requests to the remote api add the flag
"–api-enable-cors" when running docker in daemon mode.

$ docker -d -H="192.168.1.9:4243" --api-enable-cors
$ docker -d -H="192.168.1.9:2375" --api-enable-cors
4 changes: 2 additions & 2 deletions docs/sources/reference/api/docker_remote_api_v1.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ page_keywords: API, Docker, rcli, REST, documentation
# 1. Brief introduction

- The Remote API is replacing rcli
- Default port in the docker daemon is 4243
- Default port in the docker daemon is 2375
- The API tends to be REST, but for some complex commands, like attach
or pull, the HTTP connection is hijacked to transport stdout stdin
and stderr
Expand Down Expand Up @@ -999,5 +999,5 @@ stdout and stderr on the same socket. This might change in the future.
To enable cross origin requests to the remote api add the flag
"–api-enable-cors" when running docker in daemon mode.

> docker -d -H="[tcp://192.168.1.9:4243](tcp://192.168.1.9:4243)"
> docker -d -H="[tcp://192.168.1.9:2375](tcp://192.168.1.9:2375)"
> –api-enable-cors
4 changes: 2 additions & 2 deletions docs/sources/reference/api/docker_remote_api_v1.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ page_keywords: API, Docker, rcli, REST, documentation
# 1. Brief introduction

- The Remote API is replacing rcli
- Default port in the docker daemon is 4243
- Default port in the docker daemon is 2375
- The API tends to be REST, but for some complex commands, like attach
or pull, the HTTP connection is hijacked to transport stdout stdin
and stderr
Expand Down Expand Up @@ -1081,4 +1081,4 @@ stdout and stderr on the same socket. This might change in the future.
To enable cross origin requests to the remote api add the flag
"–api-enable-cors" when running docker in daemon mode.

> docker -d -H="192.168.1.9:4243" –api-enable-cors
> docker -d -H="192.168.1.9:2375" –api-enable-cors
4 changes: 2 additions & 2 deletions docs/sources/reference/api/docker_remote_api_v1.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ page_keywords: API, Docker, rcli, REST, documentation
# 1. Brief introduction

- The Remote API is replacing rcli
- Default port in the docker daemon is 4243
- Default port in the docker daemon is 2375
- The API tends to be REST, but for some complex commands, like attach
or pull, the HTTP connection is hijacked to transport stdout stdin
and stderr
Expand Down Expand Up @@ -1127,4 +1127,4 @@ stdout and stderr on the same socket. This might change in the future.
To enable cross origin requests to the remote api add the flag
"–api-enable-cors" when running docker in daemon mode.

$ docker -d -H="192.168.1.9:4243" --api-enable-cors
$ docker -d -H="192.168.1.9:2375" --api-enable-cors
4 changes: 2 additions & 2 deletions docs/sources/reference/api/docker_remote_api_v1.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ page_keywords: API, Docker, rcli, REST, documentation
# 1. Brief introduction

- The Remote API is replacing rcli
- Default port in the docker daemon is 4243
- Default port in the docker daemon is 2375
- The API tends to be REST, but for some complex commands, like attach
or pull, the HTTP connection is hijacked to transport stdout stdin
and stderr
Expand Down Expand Up @@ -1134,4 +1134,4 @@ stdout and stderr on the same socket. This might change in the future.
To enable cross origin requests to the remote api add the flag
"–api-enable-cors" when running docker in daemon mode.

$ docker -d -H="192.168.1.9:4243" --api-enable-cors
$ docker -d -H="192.168.1.9:2375" --api-enable-cors
2 changes: 1 addition & 1 deletion docs/sources/reference/api/docker_remote_api_v1.6.md
Original file line number Diff line number Diff line change
Expand Up @@ -1235,4 +1235,4 @@ stdout and stderr on the same socket. This might change in the future.
To enable cross origin requests to the remote api add the flag
"–api-enable-cors" when running docker in daemon mode.

$ docker -d -H="192.168.1.9:4243" --api-enable-cors
$ docker -d -H="192.168.1.9:2375" --api-enable-cors
2 changes: 1 addition & 1 deletion docs/sources/reference/api/docker_remote_api_v1.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -1229,4 +1229,4 @@ stdout and stderr on the same socket. This might change in the future.
To enable cross origin requests to the remote api add the flag
"–api-enable-cors" when running docker in daemon mode.

$ docker -d -H="192.168.1.9:4243" --api-enable-cors
$ docker -d -H="192.168.1.9:2375" --api-enable-cors
2 changes: 1 addition & 1 deletion docs/sources/reference/api/docker_remote_api_v1.8.md
Original file line number Diff line number Diff line change
Expand Up @@ -1275,4 +1275,4 @@ stdout and stderr on the same socket. This might change in the future.
To enable cross origin requests to the remote api add the flag
"–api-enable-cors" when running docker in daemon mode.

$ docker -d -H="192.168.1.9:4243" --api-enable-cors
$ docker -d -H="192.168.1.9:2375" --api-enable-cors
2 changes: 1 addition & 1 deletion docs/sources/reference/api/docker_remote_api_v1.9.md
Original file line number Diff line number Diff line change
Expand Up @@ -1312,4 +1312,4 @@ stdout and stderr on the same socket. This might change in the future.
To enable cross origin requests to the remote api add the flag
"–api-enable-cors" when running docker in daemon mode.

$ docker -d -H="192.168.1.9:4243" --api-enable-cors
$ docker -d -H="192.168.1.9:2375" --api-enable-cors
4 changes: 2 additions & 2 deletions docs/sources/reference/commandline/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ To use lxc as the execution driver, use `docker -d -e lxc`.
The docker client will also honor the `DOCKER_HOST` environment variable to set
the `-H` flag for the client.

$ docker -H tcp://0.0.0.0:4243 ps
$ docker -H tcp://0.0.0.0:2375 ps
# or
$ export DOCKER_HOST="tcp://0.0.0.0:4243"
$ export DOCKER_HOST="tcp://0.0.0.0:2375"
$ docker ps
# both are equal

Expand Down
10 changes: 5 additions & 5 deletions integration-cli/docker_cli_build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -683,12 +683,12 @@ func TestBuildRelativeWorkdir(t *testing.T) {

func TestBuildEnv(t *testing.T) {
name := "testbuildenv"
expected := "[HOME=/ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin PORT=4243]"
expected := "[HOME=/ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin PORT=2375]"
defer deleteImages(name)
_, err := buildImage(name,
`FROM busybox
ENV PORT 4243
RUN [ $(env | grep PORT) = 'PORT=4243' ]`,
ENV PORT 2375
RUN [ $(env | grep PORT) = 'PORT=2375' ]`,
true)
if err != nil {
t.Fatal(err)
Expand Down Expand Up @@ -726,11 +726,11 @@ func TestBuildCmd(t *testing.T) {

func TestBuildExpose(t *testing.T) {
name := "testbuildexpose"
expected := "map[4243/tcp:map[]]"
expected := "map[2375/tcp:map[]]"
defer deleteImages(name)
_, err := buildImage(name,
`FROM scratch
EXPOSE 4243`,
EXPOSE 2375`,
true)
if err != nil {
t.Fatal(err)
Expand Down
4 changes: 2 additions & 2 deletions integration/buildfile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ func TestBuildInheritance(t *testing.T) {

img, err := buildImage(testContextTemplate{`
from {IMAGE}
expose 4243
expose 2375
`,
nil, nil}, t, eng, true)

Expand All @@ -569,7 +569,7 @@ func TestBuildInheritance(t *testing.T) {
}

// from parent
if _, exists := img.Config.ExposedPorts[nat.NewPort("tcp", "4243")]; !exists {
if _, exists := img.Config.ExposedPorts[nat.NewPort("tcp", "2375")]; !exists {
t.Fail()
}
}
Expand Down
2 changes: 1 addition & 1 deletion utils/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ func TestParseHost(t *testing.T) {
if addr, err := ParseHost(defaultHttpHost, defaultUnix, "udp://127.0.0.1"); err == nil {
t.Errorf("udp protocol address expected error return, but err == nil. Got %s", addr)
}
if addr, err := ParseHost(defaultHttpHost, defaultUnix, "udp://127.0.0.1:4243"); err == nil {
if addr, err := ParseHost(defaultHttpHost, defaultUnix, "udp://127.0.0.1:2375"); err == nil {
t.Errorf("udp protocol address expected error return, but err == nil. Got %s", addr)
}
}
Expand Down

0 comments on commit 5febba9

Please sign in to comment.