Skip to content
This repository was archived by the owner on Mar 21, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions docs/user_manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ This user manual is made to correspond to Docker's [API docs][1] (e.g. [API 1.18
* [Exec Resize](#exec-resize)
* [Exec Inspect](#exec-inspect)
* [Mounting volumes in a container](#mounting-volumes-in-a-container)
* [Using RESTEasy instead of Jersey](#resteasy)


## Creating a docker-client
Expand Down Expand Up @@ -623,3 +624,58 @@ As such, the `ContainerInfo.volumes()` method is deprecated. Instead, use

[1]: https://docs.docker.com/engine/reference/api/docker_remote_api/
[2]: https://docs.docker.com/engine/reference/api/docker_remote_api_v1.18/

### Using RESTEasy instead of Jersey

To use RESTEasy in place of Jersey you just need replace a few dependencies and configure the RESTEasyClientFactory.

```xml
<dependency>
<groupId>com.spotify</groupId>
<artifactId>docker-client</artifactId>
<version>4.0.6-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>org.glassfish.jersey.connectors</groupId>
<artifactId>jersey-apache-connector</artifactId>
</exclusion>
<exclusion>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
</exclusion>
<exclusion>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-client</artifactId>
<version>3.0.16.Final</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
<version>3.0.16.Final</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jackson2-provider</artifactId>
<version>3.0.16.Final</version>
</dependency>
```

To configure the RESTEasy Client Factory:

```java
DockerClient docker = DefaultDockerClient.builder()
.uri(baseUrl)
.clientFactory(new ResteasyClientFactory())
.build();
```

#### Caveats to using alternate JAX-RS Implementations

* Events currently only work with Jersey

Loading