2018-11-09 09:10:41 -05:00
|
|
|
---
|
|
|
|
title: "context export"
|
|
|
|
description: "The context export command description and usage"
|
|
|
|
keywords: "context, export"
|
|
|
|
---
|
|
|
|
|
|
|
|
# context export
|
|
|
|
|
|
|
|
```markdown
|
|
|
|
Usage: docker context export [OPTIONS] CONTEXT [FILE|-]
|
|
|
|
|
2022-02-23 12:05:12 -05:00
|
|
|
Export a context to a tar archive FILE or a tar stream on STDOUT.
|
2018-11-09 09:10:41 -05:00
|
|
|
```
|
|
|
|
|
|
|
|
## Description
|
|
|
|
|
2022-02-23 12:05:12 -05:00
|
|
|
Exports a context to a file that can then be used with `docker context import`.
|
|
|
|
|
|
|
|
The default output filename is `<CONTEXT>.dockercontext`. To export to `STDOUT`,
|
|
|
|
use `-` as filename, for example:
|
|
|
|
|
|
|
|
```console
|
|
|
|
$ docker context export my-context -
|
|
|
|
```
|