Commit Graph

18 Commits

Author SHA1 Message Date
andregri f87b16b502
Pass StopOptions to ContainerStop function
Fix #16744

**options** argument in **ContainerStop** [function](https://github.com/moby/moby/blob/master/daemon/stop.go#L23) can't be **nil**
2023-02-18 19:03:28 +01:00
msadiq058 29e169c2b5
Update examples.md for golang (#16062)
* Update examples.md for golang

calling, `defer cli.Close()`
to close the underline transport used by the client

* fixed indentation

* added cli.close() call in index.md

Co-authored-by: Mohd Sadiq <mohd.sadiq@akridata.com>
2022-11-03 17:52:00 +01:00
Ryan Harvey cd53a8b852 Close io.ReadClosers in examples 2021-11-24 10:12:40 +00:00
Sebastiaan van Stijn 1583678203
Add missing code-hints, and minor markdown edits
- Add missing code-hints (console, yaml)
- Consistently add an empty line after code-blocks
- Combine some examples where the output and the command were
  put in separate blocks. With the "console" code-hint, this
  is no longer nescessary.
- fix indentation in cloud/ecs-integration.md, which caused the
  numbered-list to be interrupted.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-08-16 12:59:23 +02:00
Sebastiaan van Stijn 2477916f59
engine/api: use "console" for shell examples
This allows for easier copying of the commands, without selecting the
prompt.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-08-06 17:20:01 +02:00
Visarut Phusua 1fc1f0e4c9
Add parameter platform value is nil
- Run a container in the background
- Commit a container
2021-04-20 00:51:47 +07:00
Christian Clauss 1878deaf57
print() is a function in Python 3
Python 2 died on 1/1/2020 and legacy print statements are syntax errors in all currently supported versions of CPython.
2020-12-24 13:34:12 +01:00
Sebastiaan van Stijn dc55bab431
engine/api: fix cURL examples for different cURL versions
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-28 17:57:07 +01:00
Sebastiaan van Stijn c821fe1871
Add missing descriptions, and move reference index page
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-07 11:23:20 +02:00
Sebastiaan van Stijn e9750cda78
engine/api: fix incorrect ID on "http" tab
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-08-04 15:26:56 +02:00
Frederic Hemberger e529754f96
examples.md: Actually use `ctx` variable in Go example
"List and manage containers" Go example:
`ctx := context.Background()` was defined but never used.
Follow the structure of the other examples instead.
2020-08-02 10:20:54 +02:00
Chris Crone 9b6fff076e
Merge pull request #10887 from carthurs/master
Basic go example was not working with v1.41
2020-07-16 14:09:17 +02:00
Andre Almar 6f38ea561b
Fixing ImageList Go code
Original: on line 18 we have `images, err := cli.ImageList(context.Background(), types.ImageListOptions{})` which gives us an error of:

```
# command-line-arguments
./main.go:12:2: ctx declared but not used
```

*Fix:* on line 18 we need to have `images, err := cli.ImageList(ctx, types.ImageListOptions{})`
2020-06-29 16:01:24 -03:00
Chris Arthurs 14e83cac6d
Basic go example was not working with v1.41
Fixed go example:
1) so that it actually compiles, and
2) so that you get to see the output `hello world` in visual studio code's console (`Tty: true,`).
2020-05-25 14:28:51 +01:00
Sebastiaan van Stijn 777c5d23da
engine: use relative markdown links
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-23 13:03:32 +02:00
Sebastiaan van Stijn d813acb6e1
Engine: reorganize install topic
- Move getting started overview to /get-started/overview/
- Move engine installation files under /engine/
- Redirect the top-level /install/ to /get-docker/
- Updated titles in left-hand navigation
- Added back some pages to the navigation that were
  currently not included.
- Reduce some steps in the installation pages
- Move devicemapper prerequisites to the devicemapper
  storage driver page.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-06 10:50:28 +02:00
Sebastiaan van Stijn 3a223f799c
SDK: fix some minor issues in go examples
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-24 17:15:25 +01:00
Sebastiaan van Stijn ee407ac0ef
Move SDK examples under "sdk"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-24 17:15:06 +01:00