https://github.com/vqcomms/redock
A C# Docker remote API wrapper
https://github.com/vqcomms/redock
Last synced: 9 months ago
JSON representation
A C# Docker remote API wrapper
- Host: GitHub
- URL: https://github.com/vqcomms/redock
- Owner: VQComms
- License: mit
- Created: 2015-06-12T13:04:15.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2017-07-28T08:19:58.000Z (almost 9 years ago)
- Last Synced: 2025-10-03T15:10:50.633Z (9 months ago)
- Language: C#
- Homepage:
- Size: 58.6 KB
- Stars: 10
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[](https://ci.appveyor.com/project/VQCommunications/redock/branch/master)
[](https://www.nuget.org/packages/reDock/)
# ReDock
ReDock is a C# wrapper around the docker remote API. It can be used to manage your docker host remotely by creating/running/removing images and containers using C#.
## Example usage
```csharp
//connect to the docker remote
var client = new DockerClient("http://docker.local:2376");
//list all containers
var allContainers = await client.ListContainers();
//pull the images
var statusUpdate = await client.CreateImage("mono", "latest");
//create the container
var container = await client.CreateContainer(new CreateContainerOptions("mono", true, new [] { 80, 443 }));
//start the container we just created
var containerStartResponse = await client.StartContainer(container.Id);
//kill your docker container
await client.KillContainer(container.Id);
```