github.com/itscaro/cli@v0.0.0-20190705081621-c9db0fe93829/docs/reference/commandline/context_export.md (about) 1 --- 2 title: "context export" 3 description: "The context export command description and usage" 4 keywords: "context, export" 5 --- 6 7 <!-- This file is maintained within the docker/cli GitHub 8 repository at https://github.com/docker/cli/. Make all 9 pull requests against that repo. If you see this file in 10 another repository, consider it read-only there, as it will 11 periodically be overwritten by the definitive file. Pull 12 requests which include edits to this file in other repositories 13 will be rejected. 14 --> 15 16 # context export 17 18 ```markdown 19 Usage: docker context export [OPTIONS] CONTEXT [FILE|-] 20 21 Export a context to a tar or kubeconfig file 22 23 Options: 24 --kubeconfig Export as a kubeconfig file 25 ``` 26 27 ## Description 28 29 Exports a context in a file that can then be used with `docker context import` (or with `kubectl` if `--kubeconfig` is set). 30 Default output filename is `<CONTEXT>.dockercontext`, or `<CONTEXT>.kubeconfig` if `--kubeconfig` is set. 31 To export to `STDOUT`, you can run `docker context export my-context -`.