File tree 1 file changed +19
-5
lines changed
1 file changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -105,17 +105,31 @@ await client.Images.CreateImageAsync(
105
105
new Progress <JSONMessage >());
106
106
```
107
107
108
+
109
+ #### Example: Create a container
110
+
111
+ The following code will create a new container of the previously fetched image.
112
+
113
+ ``` csharp
114
+ await client .Containers .CreateContainerAsync (new CreateContainerParameters ()
115
+ {
116
+ Image = " fedora/memcached" ,
117
+ HostConfig = new HostConfig ()
118
+ {
119
+ DNS = new [] { " 8.8.8.8" , " 8.8.4.4" }
120
+ }
121
+ });
122
+ ```
123
+
108
124
#### Example: Start a container
109
125
110
- The following code will start the created container with specified ` HostConfig ` object. This object is optional, therefore you can pass a null .
126
+ The following code will start the created container.
111
127
112
128
``` csharp
113
129
await client .Containers .StartContainerAsync (
114
130
" 39e3317fd258" ,
115
- new HostConfig
116
- {
117
- DNS = new [] { " 8.8.8.8" , " 8.8.4.4" }
118
- });
131
+ new ContainerStartParameters ()
132
+ );
119
133
```
120
134
121
135
#### Example: Stop a container
You can’t perform that action at this time.
0 commit comments