summaryrefslogtreecommitdiff
path: root/devdocs/docker/engine%2Freference%2Fcommandline%2Fcontext_export%2Findex.html
blob: 064180705d0dd14ac5bdfbc12b15ba6ac307b6a4 (plain)
1
2
3
4
5
6
7
8
<h1>docker context export</h1>  <p><br></p> <p>Export a context to a tar or kubeconfig file</p> <h2 id="usage">Usage</h2> <div class="highlight"><pre class="highlight" data-language="">$ docker context export [OPTIONS] CONTEXT [FILE|-]
</pre></div> <p>Refer to the <a href="#options">options section</a> for an overview of available <a href="#options"><code class="language-plaintext highlighter-rouge">OPTIONS</code></a> for this command.</p> <h2 id="description">Description</h2> <p name="extended-description">Exports a context in a file that can then be used with <code class="language-plaintext highlighter-rouge">docker context import</code> (or with <code class="language-plaintext highlighter-rouge">kubectl</code> if <code class="language-plaintext highlighter-rouge">--kubeconfig</code> is set). Default output filename is <code class="language-plaintext highlighter-rouge">&lt;CONTEXT&gt;.dockercontext</code>, or <code class="language-plaintext highlighter-rouge">&lt;CONTEXT&gt;.kubeconfig</code> if <code class="language-plaintext highlighter-rouge">--kubeconfig</code> is set. To export to <code class="language-plaintext highlighter-rouge">STDOUT</code>, you can run <code class="language-plaintext highlighter-rouge">docker context export my-context -</code>.</p> <h2 id="options">Options</h2> <table> <thead> <tr> <td>Name, shorthand</td> <td>Default</td> <td>Description</td> </tr> </thead> <tbody> <tr> <td><code class="language-plaintext highlighter-rouge">--kubeconfig</code></td> <td></td> <td>
<a href="../../../deprecated/index" target="_blank" rel="noopener" class="_"><span class="badge badge-danger" data-toggle="tooltip" title="Read the deprecation reference (in a new window).">deprecated</span></a><span class="badge badge-info" data-toggle="tooltip" title="This option works for the Kubernetes orchestrator.">Kubernetes</span><br>Export as a kubeconfig file</td> </tr>  </tbody> </table>  <h2 id="parent-command">Parent command</h2> <table> <thead> <tr> <th style="text-align: left">Command</th> <th style="text-align: left">Description</th> </tr> </thead> <tbody> <tr> <td style="text-align: left"><a href="../context/index">docker context</a></td> <td style="text-align: left">Manage contexts</td> </tr> </tbody> </table> <h2 id="related-commands">Related commands</h2> <table> <thead> <tr> <td>Command</td> <td>Description</td> </tr> </thead> <tbody> <tr> <td><a href="../context_create/index">docker context create</a></td> <td>Create a context</td> </tr> <tr> <td><a href="index">docker context export</a></td> <td>Export a context to a tar or kubeconfig file</td> </tr> <tr> <td><a href="../context_import/index">docker context import</a></td> <td>Import a context from a tar or zip file</td> </tr> <tr> <td><a href="../context_inspect/index">docker context inspect</a></td> <td>Display detailed information on one or more contexts</td> </tr> <tr> <td><a href="../context_ls/index">docker context ls</a></td> <td>List contexts</td> </tr> <tr> <td><a href="../context_rm/index">docker context rm</a></td> <td>Remove one or more contexts</td> </tr> <tr> <td><a href="../context_update/index">docker context update</a></td> <td>Update a context</td> </tr> <tr> <td><a href="../context_use/index">docker context use</a></td> <td>Set the current docker context</td> </tr> </tbody> </table> <div class="_attribution">
  <p class="_attribution-p">
    &copy; 2019 Docker, Inc.<br>Licensed under the Apache License, Version 2.0.<br>Docker and the Docker logo are trademarks or registered trademarks of Docker, Inc. in the United States and/or other countries.<br>Docker, Inc. and other parties may also have trademark rights in other terms used herein.<br>
    <a href="https://docs.docker.com/engine/reference/commandline/context_export/" class="_attribution-link">https://docs.docker.com/engine/reference/commandline/context_export/</a>
  </p>
</div>