Skip to content
This repository has been archived by the owner on Mar 21, 2022. It is now read-only.

Commit

Permalink
Merge pull request #977 from michael-hart/master
Browse files Browse the repository at this point in the history
Added basic documentation for networks
  • Loading branch information
davidxia committed May 20, 2018
2 parents 80c41ef + 42ac190 commit 4ca7426
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions docs/user_manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,46 @@ try (final TarArchiveInputStream tarStream = new TarArchiveInputStream(docker.ar
```java
docker.copyToContainer("/local/path", "containerID", "/path/in/container");
```

## Networks

### Inspect a network

```java
docker.inspectNetwork("networkID");
```

### Create a network

```java
NetworkConfig networkConfig = NetworkConfig.builder()
.checkDuplicate(true)
.attachable(true)
.name("newNetwork")
.build();
docker.createNetwork(networkConfig);
```

### Remove a network

```java
docker.removeNetwork("networkID");
```

### Attach a container to an existing network

This should be called before starting a container, but may fail silently if duplicate networks exist.

```java
docker.connectToNetwork("containerID", "networkID");
```

### Detach a container from a network

```java
docker.disconnectFromNetwork("containerID", "networkID");
```

## Secrets

### Create secret
Expand Down

0 comments on commit 4ca7426

Please sign in to comment.