|
1 | | -# Docker Java |
| 1 | +# |
2 | 2 |
|
3 | 3 | Archives containing JAR files are available as [releases](https://github.com/intisy/docker-java/releases). |
4 | 4 |
|
5 | | -## What is intisy/docker-java? |
| 5 | +## What is docker-java? |
6 | 6 |
|
7 | 7 | Docker-java provides a standalone Docker server for Java. |
8 | 8 |
|
9 | | -## Example |
10 | | - |
11 | | - |
12 | | - |
13 | | -## Usage in private projects |
| 9 | +## Usage in private repos (faster) |
14 | 10 |
|
15 | 11 | * Maven (inside the file) |
16 | | - |
| 12 | +```xml |
| 13 | + <repository> |
| 14 | + <id>github</id> |
| 15 | + <url>https://maven.pkg.github.com/intisy/docker-java</url> |
| 16 | + <snapshots><enabled>true</enabled></snapshots> |
| 17 | + </repository> |
| 18 | + <dependency> |
| 19 | + <groupId>io.github.intisy</groupId> |
| 20 | + <artifactId>docker-java</artifactId> |
| 21 | + <version>1.1.3.2</version> |
| 22 | + </dependency> |
| 23 | +``` |
17 | 24 |
|
18 | 25 | * Maven (inside the file) |
19 | | - |
| 26 | +```xml |
| 27 | + <servers> |
| 28 | + <server> |
| 29 | + <id>github</id> |
| 30 | + <username>your-username</username> |
| 31 | + <password>your-access-token</password> |
| 32 | + </server> |
| 33 | + </servers> |
| 34 | +``` |
20 | 35 |
|
21 | 36 | * Gradle (inside the or file) |
22 | | - |
23 | | - |
24 | | -## Usage in public projects |
| 37 | +```groovy |
| 38 | + repositories { |
| 39 | + maven { |
| 40 | + url "https://maven.pkg.github.com/intisy/docker-java" |
| 41 | + credentials { |
| 42 | + username = "<your-username>" |
| 43 | + password = "<your-access-token>" |
| 44 | + } |
| 45 | + } |
| 46 | + } |
| 47 | + dependencies { |
| 48 | + implementation 'io.github.intisy:docker-java:1.1.3.2' |
| 49 | + } |
| 50 | +``` |
| 51 | + |
| 52 | +## Usage in public repos (slower and only works in gradle but safer) |
25 | 53 |
|
26 | 54 | * Gradle (inside the or file) |
27 | | - |
| 55 | +```groovy |
| 56 | + plugins { |
| 57 | + id "io.github.intisy.github-gradle" version "1.3.7" |
| 58 | + } |
| 59 | + dependencies { |
| 60 | + githubImplementation "intisy:docker-java:1.1.3.2" |
| 61 | + } |
| 62 | +``` |
| 63 | + |
| 64 | +Once you have it installed you can use it like so: |
| 65 | + |
| 66 | +```DockerProvider dockerProvider = DockerProvider.get(); |
| 67 | +dockerProvider.ensureInstalled(); |
| 68 | +dockerProvider.start(); |
| 69 | +DockerClient dockerClient = dockerProvider.getClient();``` |
28 | 70 |
|
29 | 71 | ## License |
30 | 72 |
|
|
0 commit comments