Skip to content

Commit 0a1b34c

Browse files
committed
Update README.md
1 parent 9a59b10 commit 0a1b34c

File tree

1 file changed

+15
-29
lines changed

1 file changed

+15
-29
lines changed

README.md

Lines changed: 15 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,16 @@ Java API client for [Docker](http://docs.docker.io/ "Docker")
88

99
Developer forum for [docker-java](https://groups.google.com/forum/?#!forum/docker-java-dev "docker-java")
1010

11+
[Changelog](https://github.com/docker-java/docker-java/blob/master/CHANGELOG.md)<br/>
12+
[Wiki](https://github.com/docker-java/docker-java/wiki)
13+
1114
## Build with Maven
1215

1316
###### Prerequisites:
1417

1518
* Java 1.7
1619
* Maven 3.0.5
1720

18-
If you need SSL, then you'll need to put your `*.pem` file into `~/.docker/`, if you're using boot2docker, do this:
19-
20-
$ ln -s /Users/alex.collins/.boot2docker/certs/boot2docker-vm .docker
21-
2221
Build and run integration tests as follows:
2322

2423
$ mvn clean install
@@ -27,35 +26,22 @@ If you do not have access to a Docker server or just want to execute the build q
2726

2827
$ mvn clean install -DskipITs
2928

30-
By default Docker server is using UNIX sockets for communication with the Docker client, however docker-java
31-
client uses TCP/IP to connect to the Docker server by default, so you will need to make sure that your Docker server is
32-
listening on TCP port. To allow Docker server to use TCP add the following line to /etc/default/docker
29+
By default the docker engine is using local UNIX sockets for communication with the docker CLI so docker-java
30+
client also uses UNIX domain sockets to connect to the docker daemon by default. To make the docker daemon listening on a TCP (http/https) port you have to configure it by setting the DOCKER_OPTS environment variable to something like the following:
3331

3432
DOCKER_OPTS="-H tcp://127.0.0.1:2375 -H unix:///var/run/docker.sock"
35-
36-
However you can force docker-java to use UNIX socket communication by configure the following (see [Configuration](.#Configuration) for details):
37-
38-
DOCKER_HOST=unix:///var/run/docker.sock
39-
DOCKER_TLS_VERIFY=0
40-
33+
4134
More details about setting up Docker server can be found in official documentation: http://docs.docker.io/en/latest/use/basics/
4235

43-
Now make sure that docker is up:
36+
To force docker-java to use TCP (http) configure the following (see [Configuration](https://github.com/docker-java/docker-java#configuration) for details):
4437

45-
$ docker -H tcp://127.0.0.1:2375 version
46-
47-
Client version: 0.8.0
48-
Go version (client): go1.2
49-
Git commit (client): cc3a8c8
50-
Server version: 1.2.0
51-
Git commit (server): fa7b24f
52-
Go version (server): go1.3.1
53-
54-
Run build without integration tests:
55-
56-
$ mvn clean install -DskipITs
38+
DOCKER_HOST=tcp://127.0.0.1:2375
39+
40+
For secure tls (https) communication:
5741

58-
## Docker-Java maven dependencies
42+
DOCKER_HOST=tcp://127.0.0.1:2376
43+
DOCKER_TLS_VERIFY=1
44+
DOCKER_CERT_PATH=/Users/marcus/.docker/machine/machines/docker-1.10.2
5945

6046
### Latest release version
6147
Supports a subset of the Docker Remote API [v1.22](https://github.com/docker/docker/blob/master/docs/reference/api/docker_remote_api_v1.22.md), Docker Server version 1.10.x
@@ -128,11 +114,11 @@ In your application, e.g.
128114

129115
##### System Properties:
130116

131-
java -Dregistry.username=dockeruser pkg.Main
117+
java -DDOCKER_HOST=tcp://localhost:2375 -Dregistry.username=dockeruser pkg.Main
132118

133119
##### System Environment
134120

135-
export DOCKER_URL=tcp://localhost:2376
121+
export DOCKER_HOST=tcp://localhost:2376
136122
export DOCKER_TLS_VERIFY=1
137123
export DOCKER_CERT_PATH=/home/user/.docker/certs
138124
export DOCKER_CONFIG=/home/user/.docker

0 commit comments

Comments
 (0)