Files
docker-docs/engine/reference/commandline/run/index.html
Misty Stanley-Jones aa4d8f90e3 V 1.11 js archives (#2308)
* Add an admonition to the top of the archive

    Only works if you are online and the JSON file is available at
    https://docs.docker.com/js/archives.json

    * Fix JS errors, add Segment, hide old archive links
2017-03-14 11:01:36 -07:00

3771 lines
162 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="The run command description and usage">
<meta name="keywords" content="[run, command, container]">
<title>run </title>
<link rel="shortcut icon" href="../../../../images/favicon.png" type="image/png">
<link rel="stylesheet" href="/dist/assets/css/bootstrap-custom.css"/>
<link rel="stylesheet" href="/dist/assets/css/app.css" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/animate.css/3.2.6/animate.min.css">
<link rel="stylesheet" href="../../../../css/custom.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="/dist/assets/js/bootstrap-3.0.3.min.js"></script>
<script src="../../../../dist/assets/js/modernizr.js"></script>
</head>
<body>
<div class="off-canvas-wrap" data-offcanvas>
<div class="inner-wrap">
<a class="left-off-canvas-toggle" href="#" >
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="35px" height="35px" viewBox="0 0 35 35" enable-background="new 0 0 35 35" xml:space="preserve">
<path fill="#3597D4" d="M30.583,9.328c0,0.752-0.539,1.362-1.203,1.362H5.113c-0.664,0-1.203-0.61-1.203-1.362l0,0
c0-0.752,0.539-1.362,1.203-1.362H29.38C30.045,7.966,30.583,8.576,30.583,9.328L30.583,9.328z"/>
<path fill="#3597D4" d="M30.583,17.09c0,0.752-0.539,1.362-1.203,1.362H5.113c-0.664,0-1.203-0.61-1.203-1.362l0,0
c0-0.752,0.539-1.362,1.203-1.362H29.38C30.045,15.728,30.583,16.338,30.583,17.09L30.583,17.09z"/>
<path fill="#3597D4" d="M30.583,24.387c0,0.752-0.539,1.362-1.203,1.362H5.113c-0.664,0-1.203-0.61-1.203-1.362l0,0
c0-0.752,0.539-1.362,1.203-1.362H29.38C30.045,23.025,30.583,23.635,30.583,24.387L30.583,24.387z"/>
</svg>
</a>
<a class="button secondary small get-started-cta">Get Started</a>
<header class="main-header">
<div class="row">
<div class="large-3 columns">
<a href="https://www.docker.com/"><img class="logo" src="../../../../dist/assets/images/logo.png"></a>
</div>
<div class="large-9 columns">
<ul class="nav-global">
<li><a href="https://www.docker.com/docker-support-services">Support</a></li>
<li><a href="https://training.docker.com/">Training</a></li>
<li><a href="https://docs.docker.com/">Docs</a></li>
<li><a href="http://blog.docker.com/">Blog</a></li>
<li><a href="https://hub.docker.com/">Docker Hub</a></li>
<li><a class="button" href="../../../../mac/started/">Get Started</a></li>
</ul>
<ul class="nav-main">
<li><a href="https://www.docker.com/products/overview">Products</a>
<ul>
<li><a href="https://www.docker.com/pricing">Pricing</a></li>
<li><a href="https://www.docker.com/what-docker">What is Docker?</a></li>
</ul>
</li>
<li><a href="https://www.docker.com/customers">Customers</a></li>
<li><a href="https://www.docker.com/docker-community">Community</a>
<ul>
<li><a href="https://www.docker.com/community/meetup-groups">Meetups</a></li>
<li><a href="https://www.docker.com/community/events">Events</a></li>
<li><a href="https://forums.docker.com">Forums</a></li>
<li><a href="http://www.scoop.it/t/docker-by-docker">Community News</a></li>
</ul>
</li>
<li><a href="https://www.docker.com/find-partner">Partners</a>
<ul>
<li><a href="https://www.docker.com/partners/partner-program">Partner Program</a></li>
</ul>
</li>
<li><a href="https://www.docker.com/company">Company</a>
<ul>
<li><a href="https://www.docker.com/company/news-and-press">News &amp; Press</a></li>
<li><a href="https://www.docker.com/careers">Work at Docker</a></li>
<li><a href="https://www.docker.com/company/management">Management</a></li>
<li><a href="https://www.docker.com/company/contact">Contact</a></li>
</ul>
</li>
<li><a href="https://www.docker.com/open-source">Open Source</a>
<ul>
<li><a href="https://www.docker.com/contribute">Contribute</a></li>
</ul>
</li>
</ul>
</div>
</div>
</header>
<aside class="left-off-canvas-menu">
<ul class="off-canvas-list">
<li class="has-submenu"><a href="#">Products</a>
<ul class="left-submenu">
<li class="back"><a href="#">Back</a></li>
<li><a href="#">Pricing</a></li>
<li><a href="#">What Is Docker</a></li>
<li><a href="#">Products</a></li>
<li><a href="#">Docker Engine</a></li>
<li><a href="#">Docker Hub</a></li>
<li><a href="#">Docker Registry</a></li>
<li><a href="#">Docker Machine</a></li>
<li><a href="#">Docker Swarm</a></li>
<li><a href="#">Docker Compose</a></li>
<li><a href="#">Kitematic</a></li>
</ul>
</li>
<li><a href="#">Customers</a></li>
<li class="has-submenu"><a href="#">Community</a>
<ul class="left-submenu">
<li class="back"><a href="#">Back</a></li>
<li><a href="#">Community</a></li>
<li><a href="#">Meetups</a></li>
<li><a href="https://www.docker.com/community/events">Events</a></li>
<li><a href="#">Forum</a></li>
<li><a href="#">Scoop.it</a></li>
</ul>
</li>
<li class="has-submenu"><a href="#">Partners</a>
<ul class="left-submenu">
<li class="back"><a href="#">Back</a></li>
<li><a href="#">Partners</a></li>
<li><a href="https://www.docker.com/partners/partner-program">Partners Program</a></li>
</ul>
</li>
<li><a href="#">Company</a></li>
<li class="has-submenu"><a href="#">Open Source</a>
<ul class="left-submenu">
<li class="back"><a href="#">Back</a></li>
<li><a href="#">Open Source</a></li>
<li><a href="#">Contribute</a></li>
<li><a href="#">Governance</a></li>
</ul>
</li>
</ul>
<ul class="nav-global-off-canvas">
<li><a href="#">Support</a></li>
<li><a href="#">Training</a></li>
<li><a href="#">Docs</a></li>
<li><a href="#">Blog</a></li>
<li><a href="#">Sign in</a></li>
<li><a href="#">Sign up</a></li>
</ul>
</aside>
<a class="exit-off-canvas"></a>
<div id="docs" class="row">
<div class="large-3 columns">
<section id="multiple" data-accordion-group>
<section data-accordion>
<article data-accordion>
<button data-control> Docker Engine</button>
<div data-content>
<a data-link href="../../../../engine/quickstart/" class=""> Quickstart</a>
<a data-link href="../../../../engine/understanding-docker/" class=""> Understand the architecture</a>
<article data-accordion>
<button data-control> Install</button>
<div data-content>
<a data-link href="../../../../engine/installation/mac/" class=""> Installation on Mac OS X</a>
<a data-link href="../../../../engine/installation/windows/" class=""> Installation on Windows</a>
<article data-accordion>
<button data-control> On Linux distributions</button>
<div data-content>
<a data-link href="../../../../engine/installation/linux/ubuntulinux/" class=""> Installation on Ubuntu </a>
<a data-link href="../../../../engine/installation/linux/rhel/" class=""> Installation on Red Hat Enterprise Linux</a>
<a data-link href="../../../../engine/installation/linux/centos/" class=""> Installation on CentOS</a>
<a data-link href="../../../../engine/installation/linux/fedora/" class=""> Installation on Fedora</a>
<a data-link href="../../../../engine/installation/linux/debian/" class=""> Installation on Debian</a>
<a data-link href="../../../../engine/installation/linux/archlinux/" class=""> Installation on Arch Linux</a>
<a data-link href="../../../../engine/installation/linux/cruxlinux/" class=""> Installation on CRUX Linux</a>
<a data-link href="../../../../engine/installation/linux/frugalware/" class=""> Installation on FrugalWare</a>
<a data-link href="../../../../engine/installation/linux/gentoolinux/" class=""> Installation on Gentoo</a>
<a data-link href="../../../../engine/installation/linux/oracle/" class=""> Installation on Oracle Linux</a>
<a data-link href="../../../../engine/installation/linux/SUSE/" class=""> Installation on openSUSE and SUSE Linux Enterprise</a>
</div>
</article>
<article data-accordion>
<button data-control> On cloud providers</button>
<div data-content>
<a data-link href="../../../../engine/installation/cloud/overview/" class=""> Choose how to install</a>
<a data-link href="../../../../engine/installation/cloud/cloud-ex-aws/" class=""> Example: Manual install on cloud provider</a>
<a data-link href="../../../../engine/installation/cloud/cloud-ex-machine-ocean/" class=""> Example: Use Docker Machine to provision cloud hosts</a>
</div>
</article>
<a data-link href="../../../../engine/installation/binaries/" class=""> Installation from binaries</a>
</div>
</article>
<article data-accordion>
<button data-control> User guide</button>
<div data-content>
<a data-link href="../../../../engine/userguide/intro/" class=""> Introduction</a>
<article data-accordion>
<button data-control> Learn by example</button>
<div data-content>
<a data-link href="../../../../engine/userguide/containers/dockerizing/" class=""> Hello world in a container</a>
<a data-link href="../../../../engine/userguide/containers/usingdocker/" class=""> Run a simple application</a>
<a data-link href="../../../../engine/userguide/containers/dockerimages/" class=""> Build your own images</a>
<a data-link href="../../../../engine/userguide/containers/networkingcontainers/" class=""> Network containers</a>
<a data-link href="../../../../engine/userguide/containers/dockervolumes/" class=""> Manage data in containers</a>
<a data-link href="../../../../engine/userguide/containers/dockerrepos/" class=""> Store images on Docker Hub</a>
</div>
</article>
<article data-accordion>
<button data-control> Work with images</button>
<div data-content>
<a data-link href="../../../../engine/userguide/eng-image/dockerfile_best-practices/" class=""> Best practices for writing Dockerfiles</a>
<a data-link href="../../../../engine/userguide/eng-image/baseimages/" class=""> Create a base image</a>
<a data-link href="../../../../engine/userguide/eng-image/image_management/" class=""> Image management</a>
</div>
</article>
<article data-accordion>
<button data-control> Docker storage drivers</button>
<div data-content>
<a data-link href="../../../../engine/userguide/storagedriver/imagesandcontainers/" class=""> Understand images, containers, and storage drivers</a>
<a data-link href="../../../../engine/userguide/storagedriver/selectadriver/" class=""> Select a storage driver</a>
<a data-link href="../../../../engine/userguide/storagedriver/aufs-driver/" class=""> AUFS storage driver in practice</a>
<a data-link href="../../../../engine/userguide/storagedriver/btrfs-driver/" class=""> Btrfs storage in practice</a>
<a data-link href="../../../../engine/userguide/storagedriver/device-mapper-driver/" class=""> Device mapper storage in practice</a>
<a data-link href="../../../../engine/userguide/storagedriver/overlayfs-driver/" class=""> OverlayFS storage in practice</a>
<a data-link href="../../../../engine/userguide/storagedriver/zfs-driver/" class=""> ZFS storage in practice</a>
</div>
</article>
<article data-accordion>
<button data-control> Network configuration</button>
<div data-content>
<a data-link href="../../../../engine/userguide/networking/dockernetworks/" class=""> Docker container networking</a>
<a data-link href="../../../../engine/userguide/networking/work-with-networks/" class=""> Work with network commands</a>
<a data-link href="../../../../engine/userguide/networking/get-started-overlay/" class=""> Get started with multi-host networking</a>
<a data-link href="../../../../engine/userguide/networking/configure-dns/" class=""> Configure container DNS in user-defined networks</a>
<a data-link href="../../../../engine/userguide/networking/default_network/" class=""> Default bridge network</a>
</div>
</article>
<a data-link href="../../../../engine/userguide/labels-custom-metadata/" class=""> Apply custom metadata</a>
</div>
</article>
<article data-accordion>
<button data-control> Administrate</button>
<div data-content>
<a data-link href="../../../../engine/admin/formatting/" class=""> Format command and log output</a>
<a data-link href="../../../../engine/admin/host_integration/" class=""> Automatically start containers</a>
<a data-link href="../../../../engine/admin/systemd/" class=""> Control and configure Docker with systemd</a>
<a data-link href="../../../../engine/admin/dsc/" class=""> PowerShell DSC Usage</a>
<a data-link href="../../../../engine/admin/chef/" class=""> Using Chef</a>
<a data-link href="../../../../engine/admin/puppet/" class=""> Using Puppet</a>
<a data-link href="../../../../engine/admin/using_supervisord/" class=""> Using Supervisor with Docker</a>
<a data-link href="../../../../engine/admin/configuring/" class=""> Configuring and running Docker</a>
<a data-link href="../../../../engine/admin/runmetrics/" class=""> Runtime metrics</a>
<a data-link href="../../../../engine/admin/ambassador_pattern_linking/" class=""> Link via an ambassador container</a>
<article data-accordion>
<button data-control> Logging</button>
<div data-content>
<a data-link href="../../../../engine/admin/logging/overview/" class=""> Configuring Logging Drivers</a>
<a data-link href="../../../../engine/admin/logging/log_tags/" class=""> Log tags for logging driver</a>
<a data-link href="../../../../engine/admin/logging/awslogs/" class=""> Amazon CloudWatch Logs logging driver</a>
<a data-link href="../../../../engine/admin/logging/etwlogs/" class=""> ETW logging driver</a>
<a data-link href="../../../../engine/admin/logging/fluentd/" class=""> Fluentd logging driver</a>
<a data-link href="../../../../engine/admin/logging/gcplogs/" class=""> Google Cloud Logging driver</a>
<a data-link href="../../../../engine/admin/logging/journald/" class=""> Journald logging driver</a>
<a data-link href="../../../../engine/admin/logging/splunk/" class=""> Splunk logging driver</a>
</div>
</article>
<a data-link href="../../../../engine/admin/registry_mirror/" class=""> Run a local registry mirror</a>
</div>
</article>
<article data-accordion>
<button data-control> Secure Engine</button>
<div data-content>
<a data-link href="../../../../engine/security/security/" class=""> Docker security</a>
<a data-link href="../../../../engine/security/non-events/" class=""> Docker Security Non-events</a>
<a data-link href="../../../../engine/security/https/" class=""> Protect the Docker daemon socket</a>
<a data-link href="../../../../engine/security/certificates/" class=""> Using certificates for repository client verification</a>
<article data-accordion>
<button data-control> Use trusted images</button>
<div data-content>
<a data-link href="../../../../engine/security/trust/content_trust/" class=""> Content trust in Docker</a>
<a data-link href="../../../../engine/security/trust/trust_automation/" class=""> Automation with content trust</a>
<a data-link href="../../../../engine/security/trust/trust_delegation/" class=""> Delegations for content trust</a>
<a data-link href="../../../../engine/security/trust/deploying_notary/" class=""> Deploying Notary</a>
<a data-link href="../../../../engine/security/trust/trust_key_mng/" class=""> Manage keys for content trust</a>
<a data-link href="../../../../engine/security/trust/trust_sandbox/" class=""> Play in a content trust sandbox</a>
</div>
</article>
<a data-link href="../../../../engine/security/apparmor/" class=""> AppArmor security profiles for Docker</a>
<a data-link href="../../../../engine/security/seccomp/" class=""> Seccomp security profiles for Docker</a>
</div>
</article>
<article data-accordion>
<button data-control> Extend Engine</button>
<div data-content>
<a data-link href="../../../../engine/extend/plugins_authorization/" class=""> Access authorization plugin</a>
<a data-link href="../../../../engine/extend/plugins/" class=""> Extending Engine with plugins</a>
<a data-link href="../../../../engine/extend/plugins_network/" class=""> Docker network driver plugins</a>
<a data-link href="../../../../engine/extend/plugins_volume/" class=""> Volume plugins</a>
<a data-link href="../../../../engine/extend/plugin_api/" class=""> Plugins API</a>
</div>
</article>
<article data-accordion>
<button data-control> Dockerize an application</button>
<div data-content>
<a data-link href="../../../../engine/examples/mongodb/" class=""> Dockerizing MongoDB</a>
<a data-link href="../../../../engine/examples/postgresql_service/" class=""> Dockerizing PostgreSQL</a>
<a data-link href="../../../../engine/examples/couchdb_data_volumes/" class=""> Dockerizing a CouchDB service</a>
<a data-link href="../../../../engine/examples/couchbase/" class=""> Dockerizing a Couchbase service</a>
<a data-link href="../../../../engine/examples/running_redis_service/" class=""> Dockerizing a Redis service</a>
<a data-link href="../../../../engine/examples/running_riak_service/" class=""> Dockerizing a Riak service</a>
<a data-link href="../../../../engine/examples/running_ssh_service/" class=""> Dockerizing an SSH service</a>
<a data-link href="../../../../engine/examples/apt-cacher-ng/" class=""> Dockerizing an apt-cacher-ng service</a>
</div>
</article>
<article data-accordion>
<button data-control> Engine reference</button>
<div data-content>
<a data-link href="../../../../engine/reference/builder/" class=""> Dockerfile reference</a>
<a data-link href="../../../../engine/reference/run/" class=""> Docker run reference</a>
<article data-accordion>
<button data-control> Command line reference</button>
<div data-content>
<a data-link href="../../../../engine/reference/commandline/cli/" class=""> Use the Docker command line</a>
<a data-link href="../../../../engine/reference/commandline/daemon/" class=""> daemon</a>
<a data-link href="../../../../engine/reference/commandline/attach/" class=""> attach</a>
<a data-link href="../../../../engine/reference/commandline/build/" class=""> build</a>
<a data-link href="../../../../engine/reference/commandline/commit/" class=""> commit</a>
<a data-link href="../../../../engine/reference/commandline/cp/" class=""> cp</a>
<a data-link href="../../../../engine/reference/commandline/create/" class=""> create</a>
<a data-link href="../../../../engine/reference/commandline/diff/" class=""> diff</a>
<a data-link href="../../../../engine/reference/commandline/events/" class=""> events</a>
<a data-link href="../../../../engine/reference/commandline/exec/" class=""> exec</a>
<a data-link href="../../../../engine/reference/commandline/export/" class=""> export</a>
<a data-link href="../../../../engine/reference/commandline/history/" class=""> history</a>
<a data-link href="../../../../engine/reference/commandline/images/" class=""> images</a>
<a data-link href="../../../../engine/reference/commandline/import/" class=""> import</a>
<a data-link href="../../../../engine/reference/commandline/info/" class=""> info</a>
<a data-link href="../../../../engine/reference/commandline/inspect/" class=""> inspect</a>
<a data-link href="../../../../engine/reference/commandline/kill/" class=""> kill</a>
<a data-link href="../../../../engine/reference/commandline/load/" class=""> load</a>
<a data-link href="../../../../engine/reference/commandline/login/" class=""> login</a>
<a data-link href="../../../../engine/reference/commandline/logout/" class=""> logout</a>
<a data-link href="../../../../engine/reference/commandline/logs/" class=""> logs</a>
<a data-link href="../../../../engine/reference/commandline/network_connect/" class=""> network connect</a>
<a data-link href="../../../../engine/reference/commandline/network_create/" class=""> network create</a>
<a data-link href="../../../../engine/reference/commandline/network_disconnect/" class=""> network disconnect</a>
<a data-link href="../../../../engine/reference/commandline/network_inspect/" class=""> network inspect</a>
<a data-link href="../../../../engine/reference/commandline/network_ls/" class=""> network ls</a>
<a data-link href="../../../../engine/reference/commandline/network_rm/" class=""> network rm</a>
<a data-link href="../../../../engine/reference/commandline/pause/" class=""> pause</a>
<a data-link href="../../../../engine/reference/commandline/port/" class=""> port</a>
<a data-link href="../../../../engine/reference/commandline/ps/" class=""> ps</a>
<a data-link href="../../../../engine/reference/commandline/pull/" class=""> pull</a>
<a data-link href="../../../../engine/reference/commandline/push/" class=""> push</a>
<a data-link href="../../../../engine/reference/commandline/rename/" class=""> rename</a>
<a data-link href="../../../../engine/reference/commandline/restart/" class=""> restart</a>
<a data-link href="../../../../engine/reference/commandline/rm/" class=""> rm</a>
<a data-link href="../../../../engine/reference/commandline/rmi/" class=""> rmi</a>
<a data-link href="../../../../engine/reference/commandline/run/" class=" active"> run</a>
<a data-link href="../../../../engine/reference/commandline/save/" class=""> save</a>
<a data-link href="../../../../engine/reference/commandline/search/" class=""> search</a>
<a data-link href="../../../../engine/reference/commandline/start/" class=""> start</a>
<a data-link href="../../../../engine/reference/commandline/stats/" class=""> stats</a>
<a data-link href="../../../../engine/reference/commandline/stop/" class=""> stop</a>
<a data-link href="../../../../engine/reference/commandline/tag/" class=""> tag</a>
<a data-link href="../../../../engine/reference/commandline/top/" class=""> top</a>
<a data-link href="../../../../engine/reference/commandline/unpause/" class=""> unpause</a>
<a data-link href="../../../../engine/reference/commandline/update/" class=""> update</a>
<a data-link href="../../../../engine/reference/commandline/version/" class=""> version</a>
<a data-link href="../../../../engine/reference/commandline/volume_create/" class=""> volume create</a>
<a data-link href="../../../../engine/reference/commandline/volume_inspect/" class=""> volume inspect</a>
<a data-link href="../../../../engine/reference/commandline/volume_ls/" class=""> volume ls</a>
<a data-link href="../../../../engine/reference/commandline/volume_rm/" class=""> volume rm</a>
<a data-link href="../../../../engine/reference/commandline/wait/" class=""> wait</a>
</div>
</article>
<article data-accordion>
<button data-control> API Reference</button>
<div data-content>
<a data-link href="../../../../engine/reference/api/docker_remote_api/" class=""> Remote API</a>
<a data-link href="../../../../engine/reference/api/docker_remote_api_v1.23/" class=""> Remote API v1.23</a>
<a data-link href="../../../../engine/reference/api/docker_remote_api_v1.22/" class=""> Remote API v1.22</a>
<a data-link href="../../../../engine/reference/api/docker_remote_api_v1.21/" class=""> Remote API v1.21</a>
<a data-link href="../../../../engine/reference/api/docker_remote_api_v1.20/" class=""> Remote API v1.20</a>
<a data-link href="../../../../engine/reference/api/docker_remote_api_v1.19/" class=""> Remote API v1.19</a>
<a data-link href="../../../../engine/reference/api/docker_remote_api_v1.18/" class=""> Remote API v1.18</a>
<a data-link href="../../../../engine/reference/api/remote_api_client_libraries/" class=""> Remote API client libraries</a>
<a data-link href="../../../../engine/reference/api/docker_io_accounts_api/" class=""> docker.io accounts API</a>
</div>
</article>
</div>
</article>
<a data-link href="../../../../engine/migration/" class=""> Migrate to Engine 1.10</a>
<a data-link href="../../../../engine/breaking_changes/" class=""> Breaking changes</a>
<a data-link href="../../../../engine/deprecated/" class=""> Deprecated Engine Features</a>
<a data-link href="../../../../engine/faq/" class=""> FAQ</a>
</div>
</article>
</section>
<section data-accordion>
<article data-accordion>
<button data-control> Docker Swarm</button>
<div data-content>
<a data-link href="../../../../swarm/overview/" class=""> Swarm Overview</a>
<a data-link href="../../../../swarm/get-swarm/" class=""> How to get Swarm</a>
<a data-link href="../../../../swarm/install-w-machine/" class=""> Evaluate Swarm in a sandbox</a>
<a data-link href="../../../../swarm/plan-for-production/" class=""> Plan for Swarm in production</a>
<a data-link href="../../../../swarm/install-manual/" class=""> Build a Swarm cluster for production</a>
<article data-accordion>
<button data-control> Try Swarm at scale</button>
<div data-content>
<a data-link href="../../../../swarm/swarm_at_scale/about/" class=""> Learn the application architecture</a>
<a data-link href="../../../../swarm/swarm_at_scale/deploy-infra/" class=""> Deploy application infrastructure</a>
<a data-link href="../../../../swarm/swarm_at_scale/deploy-app/" class=""> Deploy the application</a>
<a data-link href="../../../../swarm/swarm_at_scale/troubleshoot/" class=""> Troubleshoot the application</a>
</div>
</article>
<a data-link href="../../../../swarm/multi-manager-setup/" class=""> High availability in Swarm</a>
<a data-link href="../../../../swarm/networking/" class=""> Swarm and container networks</a>
<a data-link href="../../../../swarm/discovery/" class=""> Discovery</a>
<a data-link href="../../../../swarm/provision-with-machine/" class=""> Provision with Machine</a>
<article data-accordion>
<button data-control> Scheduling</button>
<div data-content>
<a data-link href="../../../../swarm/scheduler/filter/" class=""> Filters</a>
<a data-link href="../../../../swarm/scheduler/rescheduling/" class=""> Rescheduling</a>
<a data-link href="../../../../swarm/scheduler/strategy/" class=""> Strategies</a>
</div>
</article>
<a data-link href="../../../../swarm/secure-swarm-tls/" class=""> Overview Docker Swarm with TLS</a>
<a data-link href="../../../../swarm/configure-tls/" class=""> Configure Docker Swarm for TLS</a>
<article data-accordion>
<button data-control> Command line reference</button>
<div data-content>
<a data-link href="../../../../swarm/reference/create/" class=""> create</a>
<a data-link href="../../../../swarm/reference/help/" class=""> help</a>
<a data-link href="../../../../swarm/reference/join/" class=""> join</a>
<a data-link href="../../../../swarm/reference/list/" class=""> list</a>
<a data-link href="../../../../swarm/reference/manage/" class=""> manage</a>
<a data-link href="../../../../swarm/reference/swarm/" class=""> swarm</a>
</div>
</article>
<a data-link href="../../../../swarm/status-code-comparison-to-docker/" class=""> API response codes</a>
<a data-link href="../../../../swarm/swarm-api/" class=""> Docker Swarm API</a>
</div>
</article>
</section>
<section data-accordion>
<article data-accordion>
<button data-control> Docker Compose</button>
<div data-content>
<a data-link href="../../../../compose/overview/" class=""> Overview of Docker Compose</a>
<a data-link href="../../../../compose/install/" class=""> Install Compose</a>
<a data-link href="../../../../compose/gettingstarted/" class=""> Getting Started</a>
<a data-link href="../../../../compose/swarm/" class=""> Using Compose with Swarm</a>
<a data-link href="../../../../compose/django/" class=""> Quickstart: Compose and Django</a>
<a data-link href="../../../../compose/rails/" class=""> Quickstart: Compose and Rails</a>
<a data-link href="../../../../compose/wordpress/" class=""> Quickstart: Compose and WordPress</a>
<a data-link href="../../../../compose/env-file/" class=""> Environment file</a>
<a data-link href="../../../../compose/extends/" class=""> Extending Services in Compose</a>
<a data-link href="../../../../compose/networking/" class=""> Networking in Compose</a>
<a data-link href="../../../../compose/production/" class=""> Using Compose in Production</a>
<a data-link href="../../../../compose/compose-file/" class=""> Compose File Reference</a>
<article data-accordion>
<button data-control> Command-line Reference</button>
<div data-content>
<a data-link href="../../../../compose/reference/overview/" class=""> Overview of docker-compose CLI</a>
<a data-link href="../../../../compose/reference/envvars/" class=""> CLI Environment Variables</a>
<a data-link href="../../../../compose/reference/build/" class=""> build</a>
<a data-link href="../../../../compose/reference/config/" class=""> config</a>
<a data-link href="../../../../compose/reference/create/" class=""> create</a>
<a data-link href="../../../../compose/reference/down/" class=""> down</a>
<a data-link href="../../../../compose/reference/events/" class=""> events</a>
<a data-link href="../../../../compose/reference/exec/" class=""> exec</a>
<a data-link href="../../../../compose/reference/help/" class=""> help</a>
<a data-link href="../../../../compose/reference/kill/" class=""> kill</a>
<a data-link href="../../../../compose/reference/logs/" class=""> logs</a>
<a data-link href="../../../../compose/reference/pause/" class=""> pause</a>
<a data-link href="../../../../compose/reference/port/" class=""> port</a>
<a data-link href="../../../../compose/reference/ps/" class=""> ps</a>
<a data-link href="../../../../compose/reference/pull/" class=""> pull</a>
<a data-link href="../../../../compose/reference/restart/" class=""> restart</a>
<a data-link href="../../../../compose/reference/rm/" class=""> rm</a>
<a data-link href="../../../../compose/reference/run/" class=""> run</a>
<a data-link href="../../../../compose/reference/scale/" class=""> scale</a>
<a data-link href="../../../../compose/reference/start/" class=""> start</a>
<a data-link href="../../../../compose/reference/stop/" class=""> stop</a>
<a data-link href="../../../../compose/reference/unpause/" class=""> unpause</a>
<a data-link href="../../../../compose/reference/up/" class=""> up</a>
</div>
</article>
<a data-link href="../../../../compose/completion/" class=""> Command-line Completion</a>
<a data-link href="../../../../compose/link-env-deprecated/" class=""> Link Environment Variables</a>
<a data-link href="../../../../compose/startup-order/" class=""> Controlling startup order</a>
<a data-link href="../../../../compose/faq/" class=""> Frequently Asked Questions</a>
</div>
</article>
</section>
<section data-accordion>
<article data-accordion>
<button data-control> Docker Hub</button>
<div data-content>
<a data-link href="../../../../docker-hub/overview/" class=""> Introducing Docker Hub</a>
<a data-link href="../../../../docker-hub/accounts/" class=""> Your Docker ID</a>
<a data-link href="../../../../docker-hub/orgs/" class=""> Teams &amp; Organizations</a>
<a data-link href="../../../../docker-hub/repos/" class=""> Repositories on Docker Hub</a>
<a data-link href="../../../../docker-hub/builds/" class=""> Automated Builds</a>
<a data-link href="../../../../docker-hub/webhooks/" class=""> Webhooks for automated builds</a>
<a data-link href="../../../../docker-hub/bitbucket/" class=""> Automated Builds with Bitbucket</a>
<a data-link href="../../../../docker-hub/github/" class=""> Automated Builds from GitHub</a>
<a data-link href="../../../../docker-hub/official_repos/" class=""> Official Repositories on Docker Hub</a>
</div>
</article>
</section>
<section data-accordion>
<article data-accordion>
<button data-control> CS Docker Engine</button>
<div data-content>
<a data-link href="../../../../docker-trusted-registry/cs-engine/install/" class=""> Install CS Docker Engine</a>
<a data-link href="../../../../docker-trusted-registry/cs-engine/upgrade/" class=""> Upgrade</a>
<article data-accordion>
<button data-control> Release notes</button>
<div data-content>
<a data-link href="../../../../docker-trusted-registry/cs-engine/release-notes/release-notes/" class=""> CS Engine release notes</a>
<a data-link href="../../../../docker-trusted-registry/cs-engine/release-notes/prior-release-notes/" class=""> Prior CS Engine release notes</a>
</div>
</article>
</div>
</article>
</section>
<section data-accordion>
<article data-accordion>
<button data-control> Universal Control Plane</button>
<div data-content>
<a data-link href="../../../../ucp/overview/" class=""> Universal Control Plane overview</a>
<a data-link href="../../../../ucp/install-sandbox/" class=""> Evaluate UCP in a sandbox</a>
<a data-link href="../../../../ucp/architecture/" class=""> Architecture</a>
<article data-accordion>
<button data-control> Installation</button>
<div data-content>
<a data-link href="../../../../ucp/installation/system-requirements/" class=""> System requirements</a>
<a data-link href="../../../../ucp/installation/plan-production-install/" class=""> Plan a production installation</a>
<a data-link href="../../../../ucp/installation/install-production/" class=""> Install UCP for production</a>
<a data-link href="../../../../ucp/installation/install-offline/" class=""> Install offline</a>
<a data-link href="../../../../ucp/installation/license/" class=""> License UCP</a>
<a data-link href="../../../../ucp/installation/upgrade/" class=""> Upgrade UCP</a>
<a data-link href="../../../../ucp/installation/uninstall/" class=""> Uninstall UCP</a>
<article data-accordion>
<button data-control> UCP tool reference</button>
<div data-content>
<a data-link href="../../../../ucp/reference/backup/" class=""> backup</a>
<a data-link href="../../../../ucp/reference/dump-certs/" class=""> dump-certs</a>
<a data-link href="../../../../ucp/reference/engine-discovery/" class=""> engine-discovery</a>
<a data-link href="../../../../ucp/reference/fingerprint/" class=""> fingerprint</a>
<a data-link href="../../../../ucp/reference/help/" class=""> help</a>
<a data-link href="../../../../ucp/reference/id/" class=""> id</a>
<a data-link href="../../../../ucp/reference/images/" class=""> images</a>
<a data-link href="../../../../ucp/reference/install/" class=""> install</a>
<a data-link href="../../../../ucp/reference/join/" class=""> join</a>
<a data-link href="../../../../ucp/reference/regen-certs/" class=""> regen-certs.md</a>
<a data-link href="../../../../ucp/reference/restart/" class=""> restart</a>
<a data-link href="../../../../ucp/reference/restore/" class=""> restore</a>
<a data-link href="../../../../ucp/reference/stop/" class=""> stop</a>
<a data-link href="../../../../ucp/reference/uninstall/" class=""> uninstall</a>
<a data-link href="../../../../ucp/reference/upgrade/" class=""> upgrade</a>
</div>
</article>
</div>
</article>
<article data-accordion>
<button data-control> Access UCP</button>
<div data-content>
<a data-link href="../../../../ucp/access-ucp/web-based-access/" class=""> Web-based access</a>
<a data-link href="../../../../ucp/access-ucp/cli-based-access/" class=""> CLI-based access</a>
</div>
</article>
<article data-accordion>
<button data-control> Configuration</button>
<div data-content>
<a data-link href="../../../../ucp/configuration/multi-host-networking/" class=""> Set up container networking</a>
<a data-link href="../../../../ucp/configuration/dtr-integration/" class=""> Integrate with Docker Trusted Registry</a>
<a data-link href="../../../../ucp/configuration/configure-logs/" class=""> Configure UCP logging</a>
</div>
</article>
<article data-accordion>
<button data-control> Monitor and troubleshoot</button>
<div data-content>
<a data-link href="../../../../ucp/monitor/monitor-ucp/" class=""> Monitor your cluster</a>
<a data-link href="../../../../ucp/monitor/troubleshoot-ucp/" class=""> Troubleshoot your cluster</a>
<a data-link href="../../../../ucp/monitor/troubleshoot-configurations/" class=""> Troubleshoot cluster configurations</a>
</div>
</article>
<article data-accordion>
<button data-control> High-availability</button>
<div data-content>
<a data-link href="../../../../ucp/high-availability/set-up-high-availability/" class=""> Set up high availability</a>
<a data-link href="../../../../ucp/high-availability/replicate-cas/" class=""> Replicate CAs for high availability</a>
<a data-link href="../../../../ucp/high-availability/backups-and-disaster-recovery/" class=""> Backups and disaster recovery</a>
</div>
</article>
<article data-accordion>
<button data-control> User management</button>
<div data-content>
<a data-link href="../../../../ucp/user-management/manage-users/" class=""> Manage and authorize users</a>
</div>
</article>
<article data-accordion>
<button data-control> Applications</button>
<div data-content>
<a data-link href="../../../../ucp/applications/deploy-app-ui/" class=""> Deploy an app from the UI</a>
<a data-link href="../../../../ucp/applications/deploy-app-cli/" class=""> Deploy an app from the CLI</a>
</div>
</article>
<a data-link href="../../../../ucp/support/" class=""> Get support</a>
<a data-link href="../../../../ucp/release_notes/" class=""> Release Notes</a>
</div>
</article>
</section>
<section data-accordion>
<article data-accordion>
<button data-control> Docker Trusted Registry</button>
<div data-content>
<a data-link href="../../../../docker-trusted-registry/overview/" class=""> Docker Trusted Registry overview</a>
<a data-link href="../../../../docker-trusted-registry/quick-start/" class=""> Quickstart</a>
<a data-link href="../../../../docker-trusted-registry/architecture/" class=""> Architecture</a>
<article data-accordion>
<button data-control> Installation</button>
<div data-content>
<a data-link href="../../../../docker-trusted-registry/install/system-requirements/" class=""> System requirements</a>
<a data-link href="../../../../docker-trusted-registry/install/install-dtr/" class=""> Install Docker Trusted Registry</a>
<a data-link href="../../../../docker-trusted-registry/install/install-dtr-offline/" class=""> Install offline</a>
<a data-link href="../../../../docker-trusted-registry/install/license/" class=""> License DTR</a>
<article data-accordion>
<button data-control> Upgrade</button>
<div data-content>
<a data-link href="../../../../docker-trusted-registry/install/upgrade/upgrade-major/" class=""> Upgrade from 1.4.3</a>
<a data-link href="../../../../docker-trusted-registry/install/upgrade/upgrade-minor/" class=""> Upgrade from 2.0.0</a>
</div>
</article>
<a data-link href="../../../../docker-trusted-registry/install/uninstall/" class=""> Uninstall</a>
<article data-accordion>
<button data-control> DTR tool reference</button>
<div data-content>
<a data-link href="../../../../docker-trusted-registry/reference/backup/" class=""> backup</a>
<a data-link href="../../../../docker-trusted-registry/reference/dumpcerts/" class=""> dumpcerts</a>
<a data-link href="../../../../docker-trusted-registry/reference/install/" class=""> install</a>
<a data-link href="../../../../docker-trusted-registry/reference/join/" class=""> join</a>
<a data-link href="../../../../docker-trusted-registry/reference/migrate/" class=""> migrate</a>
<a data-link href="../../../../docker-trusted-registry/reference/reconfigure/" class=""> reconfigure</a>
<a data-link href="../../../../docker-trusted-registry/reference/remove/" class=""> remove</a>
<a data-link href="../../../../docker-trusted-registry/reference/restore/" class=""> restore</a>
</div>
</article>
</div>
</article>
<article data-accordion>
<button data-control> Configuration</button>
<div data-content>
<a data-link href="../../../../docker-trusted-registry/configure/configuration/" class=""> Configuration overview</a>
<a data-link href="../../../../docker-trusted-registry/configure/config-general/" class=""> Configure general settings</a>
<a data-link href="../../../../docker-trusted-registry/configure/config-security/" class=""> Security configuration</a>
<a data-link href="../../../../docker-trusted-registry/configure/config-storage/" class=""> Storage configuration</a>
<a data-link href="../../../../docker-trusted-registry/configure/config-auth/" class=""> Auth configuration</a>
</div>
</article>
<article data-accordion>
<button data-control> Monitor and troubleshoot</button>
<div data-content>
<a data-link href="../../../../docker-trusted-registry/monitor-troubleshoot/monitor/" class=""> Monitor DTR</a>
<a data-link href="../../../../docker-trusted-registry/monitor-troubleshoot/troubleshoot/" class=""> Troubleshoot DTR</a>
</div>
</article>
<article data-accordion>
<button data-control> High-availability</button>
<div data-content>
<a data-link href="../../../../docker-trusted-registry/high-availability/high-availability/" class=""> Set up high availability</a>
<a data-link href="../../../../docker-trusted-registry/high-availability/backups-and-disaster-recovery/" class=""> Backups and disaster recovery</a>
</div>
</article>
<article data-accordion>
<button data-control> User management</button>
<div data-content>
<a data-link href="../../../../docker-trusted-registry/user-management/permission-levels/" class=""> Permission levels</a>
</div>
</article>
<article data-accordion>
<button data-control> Repositories and images</button>
<div data-content>
<a data-link href="../../../../docker-trusted-registry/repos-and-images/create-repo/" class=""> Create a repository</a>
<a data-link href="../../../../docker-trusted-registry/repos-and-images/push-and-pull-images/" class=""> Push and pull images</a>
<a data-link href="../../../../docker-trusted-registry/repos-and-images/delete-images/" class=""> Delete images</a>
</div>
</article>
<article data-accordion>
<button data-control> DTR APIs</button>
<div data-content>
<a data-link href="../../../../apidocs/overview/" class=""> Overview</a>
<a data-link href="../../../../apidocs/v1.3.3/" class=""> v1.3.3 API</a>
<a data-link href="../../../../apidocs/v1.4.0/" class=""> v1.4.0 API</a>
<a data-link href="../../../../apidocs/v2.0.0/" class=""> v2.0.0 API</a>
<a data-link href="../../../../apidocs/v2.0.1/" class=""> v2.0.1 API</a>
</div>
</article>
<article data-accordion>
<button data-control> Release notes</button>
<div data-content>
<a data-link href="../../../../docker-trusted-registry/release-notes/release-notes/" class=""> Trusted Registry release notes</a>
<a data-link href="../../../../docker-trusted-registry/release-notes/prior-release-notes/" class=""> Prior Trusted Registry release notes</a>
</div>
</article>
<a data-link href="../../../../docker-trusted-registry/support/" class=""> Get support</a>
</div>
</article>
</section>
<section data-accordion>
<article data-accordion>
<button data-control> Docker Cloud</button>
<div data-content>
<a data-link href="../../../../docker-cloud/overview/" class=""> Docker Cloud Overview</a>
<a data-link href="../../../../docker-cloud/dockerid/" class=""> Docker ID and Settings</a>
<article data-accordion>
<button data-control> Getting Started</button>
<div data-content>
<a data-link href="../../../../docker-cloud/getting-started/intro_cloud/" class=""> Introducing Docker Cloud</a>
<a data-link href="../../../../docker-cloud/getting-started/connect-infra/" class=""> Link to your Infrastructure</a>
<a data-link href="../../../../docker-cloud/getting-started/your_first_node/" class=""> Deploy your first node</a>
<a data-link href="../../../../docker-cloud/getting-started/your_first_service/" class=""> Deploy your first service</a>
<article data-accordion>
<button data-control> Deploy an application</button>
<div data-content>
<a data-link href="../../../../docker-cloud/getting-started/deploy-app/1_introduction/" class=""> Introduction to Deploying an app in Docker Cloud</a>
<a data-link href="../../../../docker-cloud/getting-started/deploy-app/2_set_up/" class=""> Set up your environment</a>
<a data-link href="../../../../docker-cloud/getting-started/deploy-app/3_prepare_the_app/" class=""> Prepare the application</a>
<a data-link href="../../../../docker-cloud/getting-started/deploy-app/4_push_to_cloud_registry/" class=""> Push the image to Docker Cloud&#39;s Registry</a>
<a data-link href="../../../../docker-cloud/getting-started/deploy-app/5_deploy_the_app_as_a_service/" class=""> Deploy the app as a Docker Cloud service</a>
<a data-link href="../../../../docker-cloud/getting-started/deploy-app/6_define_environment_variables/" class=""> Define environment variables</a>
<a data-link href="../../../../docker-cloud/getting-started/deploy-app/7_scale_the_service/" class=""> Scale the service</a>
<a data-link href="../../../../docker-cloud/getting-started/deploy-app/8_view_logs/" class=""> View service logs</a>
<a data-link href="../../../../docker-cloud/getting-started/deploy-app/9_load-balance_the_service/" class=""> Load-balance the service</a>
<a data-link href="../../../../docker-cloud/getting-started/deploy-app/10_provision_a_data_backend_for_your_service/" class=""> Provision a data backend for the service</a>
<a data-link href="../../../../docker-cloud/getting-started/deploy-app/11_service_stacks/" class=""> Stackfiles for your service</a>
<a data-link href="../../../../docker-cloud/getting-started/deploy-app/12_data_management_with_volumes/" class=""> Data management with Volumes</a>
</div>
</article>
</div>
</article>
<article data-accordion>
<button data-control> Manage Applications</button>
<div data-content>
<a data-link href="../../../../docker-cloud/apps/deploy-to-cloud-btn/" class=""> Add a Deploy to Docker Cloud button</a>
<a data-link href="../../../../docker-cloud/apps/auto-destroy/" class=""> Automatic container destroy</a>
<a data-link href="../../../../docker-cloud/apps/autorestart/" class=""> Automatic container restart</a>
<a data-link href="../../../../docker-cloud/apps/auto-redeploy/" class=""> Automatic service redeploy</a>
<a data-link href="../../../../docker-cloud/apps/load-balance-hello-world/" class=""> Create a proxy or load balancer</a>
<a data-link href="../../../../docker-cloud/apps/deploy-tags/" class=""> Deployment tags</a>
<a data-link href="../../../../docker-cloud/apps/stacks/" class=""> Manage service stacks</a>
<a data-link href="../../../../docker-cloud/apps/ports/" class=""> Publish and expose service or container ports</a>
<a data-link href="../../../../docker-cloud/apps/service-redeploy/" class=""> Redeploy running services</a>
<a data-link href="../../../../docker-cloud/apps/service-scaling/" class=""> Scale your service</a>
<a data-link href="../../../../docker-cloud/apps/api-roles/" class=""> Service API Roles</a>
<a data-link href="../../../../docker-cloud/apps/service-links/" class=""> Service discovery and links</a>
<a data-link href="../../../../docker-cloud/apps/stack-yaml-reference/" class=""> Stack YAML reference</a>
<a data-link href="../../../../docker-cloud/apps/triggers/" class=""> Use triggers</a>
<a data-link href="../../../../docker-cloud/apps/volumes/" class=""> Work with data volumes</a>
</div>
</article>
<article data-accordion>
<button data-control> Manage Builds and Images</button>
<div data-content>
<a data-link href="../../../../docker-cloud/builds/automated-build/" class=""> Automated builds</a>
<a data-link href="../../../../docker-cloud/builds/automated-testing/" class=""> Automated repository tests</a>
<a data-link href="../../../../docker-cloud/builds/repos/" class=""> Docker Cloud repositories</a>
<a data-link href="../../../../docker-cloud/builds/link-source/" class=""> Link to a source code repository</a>
<a data-link href="../../../../docker-cloud/builds/push-images/" class=""> Push images to Docker Cloud</a>
<a data-link href="../../../../docker-cloud/builds/image-scan/" class=""> Security Scanning in Docker Cloud</a>
</div>
</article>
<article data-accordion>
<button data-control> Manage Infrastructure</button>
<div data-content>
<a data-link href="../../../../docker-cloud/infrastructure/deployment-strategies/" class=""> Container distribution strategies</a>
<a data-link href="../../../../docker-cloud/infrastructure/link-aws/" class=""> Link to Amazon Web Services hosts</a>
<a data-link href="../../../../docker-cloud/infrastructure/link-do/" class=""> Link to DigitalOcean hosts</a>
<a data-link href="../../../../docker-cloud/infrastructure/link-azure/" class=""> Link to Microsoft Azure hosts</a>
<a data-link href="../../../../docker-cloud/infrastructure/link-packet/" class=""> Link to Packet hosts</a>
<a data-link href="../../../../docker-cloud/infrastructure/link-softlayer/" class=""> Link to SoftLayer hosts</a>
<a data-link href="../../../../docker-cloud/infrastructure/ssh-into-a-node/" class=""> SSH into a Docker Cloud-managed node</a>
<a data-link href="../../../../docker-cloud/infrastructure/docker-upgrade/" class=""> Upgrade Docker Engine on a node</a>
<a data-link href="../../../../docker-cloud/infrastructure/byoh/" class=""> Use the Docker Cloud Agent</a>
<a data-link href="../../../../docker-cloud/infrastructure/cloud-on-packet.net-faq/" class=""> Using Docker Cloud and Packet.net</a>
<a data-link href="../../../../docker-cloud/infrastructure/cloud-on-aws-faq/" class=""> Using Docker Cloud on AWS</a>
</div>
</article>
<a data-link href="../../../../docker-cloud/slack-integration/" class=""> Docker Cloud notifications in Slack</a>
<a data-link href="../../../../docker-cloud/installing-cli/" class=""> The Docker Cloud CLI</a>
<a data-link href="../../../../docker-cloud/docker-errors-faq/" class=""> Known Issues in Docker Cloud</a>
<a data-link href="../../../../apidocs/docker-cloud/" class=""> API reference</a>
<a data-link href="../../../../docker-cloud/release-notes/" class=""> Release Notes</a>
</div>
</article>
</section>
<section data-accordion>
<article data-accordion>
<button data-control> Docker Machine</button>
<div data-content>
<a data-link href="../../../../machine/overview/" class=""> Machine Overview</a>
<a data-link href="../../../../machine/install-machine/" class=""> Install Machine</a>
<a data-link href="../../../../machine/get-started/" class=""> Get started with a local VM</a>
<a data-link href="../../../../machine/get-started-cloud/" class=""> Provision hosts in the cloud</a>
<article data-accordion>
<button data-control> Learn by example</button>
<div data-content>
<a data-link href="../../../../machine/examples/ocean/" class=""> Provision Digital Ocean Droplets</a>
<a data-link href="../../../../machine/examples/aws/" class=""> Provision AWS EC2 Instances</a>
</div>
</article>
<a data-link href="../../../../machine/concepts/" class=""> Machine concepts and help</a>
<a data-link href="../../../../machine/migrate-to-machine/" class=""> Migrate from Boot2Docker to Machine</a>
<article data-accordion>
<button data-control> Command line reference</button>
<div data-content>
<a data-link href="../../../../machine/reference/active/" class=""> active</a>
<a data-link href="../../../../machine/reference/config/" class=""> config</a>
<a data-link href="../../../../machine/reference/create/" class=""> create</a>
<a data-link href="../../../../machine/reference/env/" class=""> env</a>
<a data-link href="../../../../machine/reference/help/" class=""> help</a>
<a data-link href="../../../../machine/reference/inspect/" class=""> inspect</a>
<a data-link href="../../../../machine/reference/ip/" class=""> ip</a>
<a data-link href="../../../../machine/reference/kill/" class=""> kill</a>
<a data-link href="../../../../machine/reference/ls/" class=""> ls</a>
<a data-link href="../../../../machine/reference/provision/" class=""> provision</a>
<a data-link href="../../../../machine/reference/regenerate-certs/" class=""> regenerate-certs</a>
<a data-link href="../../../../machine/reference/restart/" class=""> restart</a>
<a data-link href="../../../../machine/reference/rm/" class=""> rm</a>
<a data-link href="../../../../machine/reference/scp/" class=""> scp</a>
<a data-link href="../../../../machine/reference/ssh/" class=""> ssh</a>
<a data-link href="../../../../machine/reference/start/" class=""> start</a>
<a data-link href="../../../../machine/reference/status/" class=""> status</a>
<a data-link href="../../../../machine/reference/stop/" class=""> stop</a>
<a data-link href="../../../../machine/reference/upgrade/" class=""> upgrade</a>
<a data-link href="../../../../machine/reference/url/" class=""> url</a>
</div>
</article>
<article data-accordion>
<button data-control> Drivers</button>
<div data-content>
<a data-link href="../../../../machine/drivers/os-base/" class=""> Driver options and operating system defaults</a>
<a data-link href="../../../../machine/drivers/aws/" class=""> Amazon Web Services</a>
<a data-link href="../../../../machine/drivers/digital-ocean/" class=""> Digital Ocean</a>
<a data-link href="../../../../machine/drivers/generic/" class=""> Generic</a>
<a data-link href="../../../../machine/drivers/gce/" class=""> Google Compute Engine</a>
<a data-link href="../../../../machine/drivers/soft-layer/" class=""> IBM Softlayer</a>
<a data-link href="../../../../machine/drivers/azure/" class=""> Microsoft Azure</a>
<a data-link href="../../../../machine/drivers/hyper-v/" class=""> Microsoft Hyper-V</a>
<a data-link href="../../../../machine/drivers/openstack/" class=""> OpenStack</a>
<a data-link href="../../../../machine/drivers/virtualbox/" class=""> Oracle VirtualBox</a>
<a data-link href="../../../../machine/drivers/rackspace/" class=""> Rackspace</a>
<a data-link href="../../../../machine/drivers/vm-fusion/" class=""> VMware Fusion</a>
<a data-link href="../../../../machine/drivers/vm-cloud/" class=""> VMware vCloud Air</a>
<a data-link href="../../../../machine/drivers/vsphere/" class=""> VMware vSphere</a>
<a data-link href="../../../../machine/drivers/exoscale/" class=""> exoscale</a>
</div>
</article>
<a data-link href="../../../../machine/completion/" class=""> Command-line Completion</a>
</div>
</article>
</section>
<section data-accordion>
<article data-accordion>
<button data-control> Docker Toolbox</button>
<div data-content>
<a data-link href="../../../../toolbox/overview/" class=""> Toolbox Overview</a>
<article data-accordion>
<button data-control> Kitematic</button>
<div data-content>
<a data-link href="../../../../kitematic/userguide/" class=""> Kitematic User Guide: Intro &amp; Overview</a>
<a data-link href="../../../../kitematic/nginx-web-server/" class=""> Set up an Nginx web server</a>
<a data-link href="../../../../kitematic/minecraft-server/" class=""> Set up a Minecraft Server</a>
<a data-link href="../../../../kitematic/rethinkdb-dev-database/" class=""> Creating a Local RethinkDB Database for Development</a>
<a data-link href="../../../../kitematic/faq/" class=""> Frequently Asked Questions</a>
<a data-link href="../../../../kitematic/known-issues/" class=""> Known Issues</a>
</div>
</article>
<a data-link href="../../../../faqs/troubleshoot/" class=""> Troubleshooting</a>
</div>
</article>
</section>
<section data-accordion>
<article data-accordion>
<button data-control> Component Projects</button>
<div data-content>
<article data-accordion>
<button data-control> Docker Registry</button>
<div data-content>
<a data-link href="../../../../registry/" class=""> Registry Overview</a>
<a data-link href="../../../../registry/introduction/" class=""> Understanding the Registry</a>
<a data-link href="../../../../registry/deploying/" class=""> Deploying a registry server</a>
<a data-link href="../../../../registry/configuration/" class=""> Configuring a registry</a>
<a data-link href="../../../../registry/notifications/" class=""> Working with notifications</a>
<article data-accordion>
<button data-control> Recipes</button>
<div data-content>
<a data-link href="../../../../registry/recipes/" class=""> Recipes Overview</a>
<a data-link href="../../../../registry/recipes/apache/" class=""> Authenticating proxy with apache</a>
<a data-link href="../../../../registry/recipes/nginx/" class=""> Authenticating proxy with nginx</a>
<a data-link href="../../../../registry/recipes/building/" class=""> Build instructions</a>
<a data-link href="../../../../registry/recipes/mirror/" class=""> Mirroring Docker Hub</a>
<a data-link href="../../../../registry/recipes/osx-setup-guide/" class=""> Running on OS X</a>
</div>
</article>
<article data-accordion>
<button data-control> Reference</button>
<div data-content>
<a data-link href="../../../../registry/spec/" class=""> Reference Overview</a>
<a data-link href="../../../../registry/spec/api/" class=""> HTTP API V2</a>
<a data-link href="../../../../registry/spec/manifest-v2-1/" class=""> Image Manifest V 2, Schema 1 </a>
<a data-link href="../../../../registry/spec/manifest-v2-2/" class=""> Image Manifest V 2, Schema 2 </a>
<a data-link href="../../../../registry/garbage-collection/" class=""> Garbage Collection</a>
<a data-link href="../../../../registry/insecure/" class=""> Testing an insecure registry</a>
<a data-link href="../../../../registry/compatibility/" class=""> Compatibility</a>
<a data-link href="../../../../registry/spec/auth/" class=""> Docker Registry Token Authentication</a>
<a data-link href="../../../../registry/spec/auth/jwt/" class=""> Token Authentication Implementation</a>
<a data-link href="../../../../registry/spec/auth/oauth/" class=""> Oauth2 Token Authentication</a>
<a data-link href="../../../../registry/spec/auth/scope/" class=""> Token Scope Documentation</a>
<a data-link href="../../../../registry/spec/auth/token/" class=""> Token Authentication Specification</a>
</div>
</article>
<article data-accordion>
<button data-control> Storage Drivers</button>
<div data-content>
<a data-link href="../../../../registry/storage-drivers/" class=""> Storage Driver overview</a>
<a data-link href="../../../../registry/storage-drivers/oss/" class=""> Aliyun OSS storage driver</a>
<a data-link href="../../../../registry/storage-drivers/filesystem/" class=""> Filesystem storage driver</a>
<a data-link href="../../../../registry/storage-drivers/gcs/" class=""> GCS storage driver</a>
<a data-link href="../../../../registry/storage-drivers/inmemory/" class=""> In-memory storage driver</a>
<a data-link href="../../../../registry/storage-drivers/azure/" class=""> Microsoft Azure storage driver</a>
<a data-link href="../../../../registry/storage-drivers/s3/" class=""> S3 storage driver</a>
<a data-link href="../../../../registry/storage-drivers/swift/" class=""> Swift storage driver</a>
</div>
</article>
<a data-link href="../../../../registry/help/" class=""> Getting help</a>
</div>
</article>
<article data-accordion>
<button data-control> Docker Notary</button>
<div data-content>
<a data-link href="../../../../notary/getting_started/" class=""> Getting started with Notary</a>
<a data-link href="../../../../notary/advanced_usage/" class=""> Use the Notary client</a>
<a data-link href="../../../../notary/service_architecture/" class=""> Understand the service architecture</a>
<a data-link href="../../../../notary/running_a_service/" class=""> Running a Notary service</a>
<article data-accordion>
<button data-control> Notary Configuration</button>
<div data-content>
<a data-link href="../../../../notary/reference/server-config/" class=""> Server Configuration</a>
<a data-link href="../../../../notary/reference/signer-config/" class=""> Signer Configuration</a>
<a data-link href="../../../../notary/reference/client-config/" class=""> Client Configuration</a>
<a data-link href="../../../../notary/reference/common-configs/" class=""> Common Server and Signer Configurations</a>
</div>
</article>
<a data-link href="../../../../notary/changelog/" class=""> Notary Changelog</a>
</div>
</article>
</div>
</article>
</section>
<section data-accordion>
<article data-accordion>
<button data-control> Open Source at Docker</button>
<div data-content>
<a data-link href="../../../../opensource/code/" class=""> Quickstart contribution</a>
<article data-accordion>
<button data-control> Set up for Engine Development</button>
<div data-content>
<a data-link href="../../../../opensource/project/who-written-for/" class=""> README first</a>
<a data-link href="../../../../opensource/project/software-required/" class=""> Get the required software</a>
<a data-link href="../../../../opensource/project/software-req-win/" class=""> Set up for development on Windows</a>
<a data-link href="../../../../opensource/project/set-up-git/" class=""> Configure Git for contributing</a>
<a data-link href="../../../../opensource/project/set-up-dev-env/" class=""> Work with a development container</a>
<a data-link href="../../../../opensource/project/test-and-docs/" class=""> Run tests and test documentation</a>
</div>
</article>
<article data-accordion>
<button data-control> Contribution workflow</button>
<div data-content>
<a data-link href="../../../../opensource/workflow/make-a-contribution/" class=""> Understand how to contribute</a>
<a data-link href="../../../../opensource/workflow/find-an-issue/" class=""> Find and claim an issue</a>
<a data-link href="../../../../opensource/workflow/work-issue/" class=""> Work on your issue</a>
<a data-link href="../../../../opensource/workflow/create-pr/" class=""> Create a pull request (PR)</a>
<a data-link href="../../../../opensource/workflow/review-pr/" class=""> Participate in the PR review</a>
<a data-link href="../../../../opensource/workflow/advanced-contributing/" class=""> Advanced contributing</a>
<a data-link href="../../../../opensource/workflow/coding-style/" class=""> Coding style checklist</a>
</div>
</article>
<article data-accordion>
<button data-control> Other ways to contribute</button>
<div data-content>
<a data-link href="../../../../opensource/ways/meetups/" class=""> Organize a Docker Meetup</a>
<a data-link href="../../../../opensource/ways/issues/" class=""> Organize our issues</a>
<a data-link href="../../../../opensource/ways/community/" class=""> Support the community</a>
<a data-link href="../../../../opensource/ways/test/" class=""> Testing contributions</a>
</div>
</article>
<article data-accordion>
<button data-control> Contribute to Kitematic</button>
<div data-content>
<a data-link href="../../../../opensource/kitematic/get_started/" class=""> Get started</a>
<a data-link href="../../../../opensource/kitematic/find_issue/" class=""> Find an issue</a>
<a data-link href="../../../../opensource/kitematic/set_up_dev/" class=""> Set up for Kitematic development</a>
<a data-link href="../../../../opensource/kitematic/work_issue/" class=""> Develop in Kitematic (work on an issue)</a>
<a data-link href="../../../../opensource/kitematic/create_pr/" class=""> Create a pull request (PR)</a>
<a data-link href="../../../../opensource/kitematic/next_steps/" class=""> Where to learn more</a>
</div>
</article>
<article data-accordion>
<button data-control> Governance</button>
<div data-content>
<a data-link href="../../../../opensource/governance/dgab-info/" class=""> Docker Governance Advisory Board</a>
<a data-link href="../../../../opensource/governance/board-profiles/" class=""> Board member profiles</a>
<a data-link href="../../../../opensource/governance/conduct-code/" class=""> Code of conduct</a>
</div>
</article>
<a data-link href="../../../../opensource/FAQ/" class=""> FAQ for contributors</a>
<a data-link href="../../../../opensource/get-help/" class=""> Where to chat or get help</a>
<a data-link href="../../../../opensource/doc-style/" class=""> Style guide for Docker documentation</a>
</div>
</article>
</section>
<section data-accordion>
<article data-accordion>
<button data-control> About</button>
<div data-content>
<a data-link href="../../../../release-notes/" class=""> Docker Release Notes</a>
<a data-link href="../../../../engine/reference/glossary/" class=""> Docker Glossary</a>
</div>
</article>
</section>
<section data-accordion>
<article data-accordion>
<button style="visibility: hidden" data-control> Docs archive</button>
<div data-content>
<a data-link href="http://docs.docker.com/v1.10/" class=""> Version 1.10</a>
<a data-link href="http://docs.docker.com/v1.9/" class=""> Version 1.9</a>
<a data-link href="http://docs.docker.com/v1.8/" class=""> Version 1.8</a>
<a data-link href="http://docs.docker.com/v1.7/" class=""> Version 1.7</a>
<a data-link href="http://docs.docker.com/v1.6/" class=""> Version 1.6</a>
<a data-link href="http://docs.docker.com/v1.5/" class=""> Version 1.5</a>
<a data-link href="http://docs.docker.com/v1.4/" class=""> Version 1.4</a>
</div>
</article>
</section>
</section>
<script>
$(document).ready(function () {
var $activeLink = $('#multiple [data-link].active');
var $accordions = $activeLink.parents('article[data-accordion]');
$($accordions.get().reverse()).each(function (index, accordion) {
var $accordion = $(accordion);
var $content = $accordion.find('[data-content]');
$accordion.addClass('open');
$content.css({'max-height': '100%'});
});
});
</script>
</div>
<div class="large-6 columns">
<section id="main">
<article id="content">
<h1 id="run">run</h1>
<pre><code>Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG...]
Run a command in a new container
-a, --attach=[] Attach to STDIN, STDOUT or STDERR
--add-host=[] Add a custom host-to-IP mapping (host:ip)
--blkio-weight=0 Block IO weight (relative weight)
--blkio-weight-device=[] Block IO weight (relative device weight, format: `DEVICE_NAME:WEIGHT`)
--cpu-shares=0 CPU shares (relative weight)
--cap-add=[] Add Linux capabilities
--cap-drop=[] Drop Linux capabilities
--cgroup-parent=&quot;&quot; Optional parent cgroup for the container
--cidfile=&quot;&quot; Write the container ID to the file
--cpu-period=0 Limit CPU CFS (Completely Fair Scheduler) period
--cpu-quota=0 Limit CPU CFS (Completely Fair Scheduler) quota
--cpuset-cpus=&quot;&quot; CPUs in which to allow execution (0-3, 0,1)
--cpuset-mems=&quot;&quot; Memory nodes (MEMs) in which to allow execution (0-3, 0,1)
-d, --detach Run container in background and print container ID
--detach-keys Specify the escape key sequence used to detach a container
--device=[] Add a host device to the container
--device-read-bps=[] Limit read rate (bytes per second) from a device (e.g., --device-read-bps=/dev/sda:1mb)
--device-read-iops=[] Limit read rate (IO per second) from a device (e.g., --device-read-iops=/dev/sda:1000)
--device-write-bps=[] Limit write rate (bytes per second) to a device (e.g., --device-write-bps=/dev/sda:1mb)
--device-write-iops=[] Limit write rate (IO per second) to a device (e.g., --device-write-bps=/dev/sda:1000)
--disable-content-trust=true Skip image verification
--dns=[] Set custom DNS servers
--dns-opt=[] Set custom DNS options
--dns-search=[] Set custom DNS search domains
-e, --env=[] Set environment variables
--entrypoint=&quot;&quot; Overwrite the default ENTRYPOINT of the image
--env-file=[] Read in a file of environment variables
--expose=[] Expose a port or a range of ports
--group-add=[] Add additional groups to run as
-h, --hostname=&quot;&quot; Container host name
--help Print usage
-i, --interactive Keep STDIN open even if not attached
--ip=&quot;&quot; Container IPv4 address (e.g. 172.30.100.104)
--ip6=&quot;&quot; Container IPv6 address (e.g. 2001:db8::33)
--ipc=&quot;&quot; IPC namespace to use
--isolation=&quot;&quot; Container isolation technology
--kernel-memory=&quot;&quot; Kernel memory limit
-l, --label=[] Set metadata on the container (e.g., --label=com.example.key=value)
--label-file=[] Read in a file of labels (EOL delimited)
--link=[] Add link to another container
--log-driver=&quot;&quot; Logging driver for container
--log-opt=[] Log driver specific options
-m, --memory=&quot;&quot; Memory limit
--mac-address=&quot;&quot; Container MAC address (e.g. 92:d0:c6:0a:29:33)
--memory-reservation=&quot;&quot; Memory soft limit
--memory-swap=&quot;&quot; A positive integer equal to memory plus swap. Specify -1 to enable unlimited swap.
--memory-swappiness=&quot;&quot; Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100.
--name=&quot;&quot; Assign a name to the container
--net=&quot;bridge&quot; Connect a container to a network
'bridge': create a network stack on the default Docker bridge
'none': no networking
'container:&lt;name|id&gt;': reuse another container's network stack
'host': use the Docker host network stack
'&lt;network-name&gt;|&lt;network-id&gt;': connect to a user-defined network
--net-alias=[] Add network-scoped alias for the container
--oom-kill-disable Whether to disable OOM Killer for the container or not
--oom-score-adj=0 Tune the host's OOM preferences for containers (accepts -1000 to 1000)
-P, --publish-all Publish all exposed ports to random ports
-p, --publish=[] Publish a container's port(s) to the host
--pid=&quot;&quot; PID namespace to use
--pids-limit=-1 Tune container pids limit (set -1 for unlimited), kernel &gt;= 4.3
--privileged Give extended privileges to this container
--read-only Mount the container's root filesystem as read only
--restart=&quot;no&quot; Restart policy (no, on-failure[:max-retry], always, unless-stopped)
--rm Automatically remove the container when it exits
--shm-size=[] Size of `/dev/shm`. The format is `&lt;number&gt;&lt;unit&gt;`. `number` must be greater than `0`. Unit is optional and can be `b` (bytes), `k` (kilobytes), `m` (megabytes), or `g` (gigabytes). If you omit the unit, the system uses bytes. If you omit the size entirely, the system uses `64m`.
--security-opt=[] Security Options
--sig-proxy=true Proxy received signals to the process
--stop-signal=&quot;SIGTERM&quot; Signal to stop a container
-t, --tty Allocate a pseudo-TTY
-u, --user=&quot;&quot; Username or UID (format: &lt;name|uid&gt;[:&lt;group|gid&gt;])
--userns=&quot;&quot; Container user namespace
'host': Use the Docker host user namespace
'': Use the Docker daemon user namespace specified by `--userns-remap` option.
--ulimit=[] Ulimit options
--uts=&quot;&quot; UTS namespace to use
-v, --volume=[host-src:]container-dest[:&lt;options&gt;]
Bind mount a volume. The comma-delimited
`options` are [rw|ro], [z|Z],
[[r]shared|[r]slave|[r]private], and
[nocopy]. The 'host-src' is an absolute path
or a name value.
--volume-driver=&quot;&quot; Container's volume driver
--volumes-from=[] Mount volumes from the specified container(s)
-w, --workdir=&quot;&quot; Working directory inside the container
</code></pre>
<p>The <code>docker run</code> command first <code>creates</code> a writeable container layer over the
specified image, and then <code>starts</code> it using the specified command. That is,
<code>docker run</code> is equivalent to the API <code>/containers/create</code> then
<code>/containers/(id)/start</code>. A stopped container can be restarted with all its
previous changes intact using <code>docker start</code>. See <code>docker ps -a</code> to view a list
of all containers.</p>
<p>The <code>docker run</code> command can be used in combination with <code>docker commit</code> to
<a href="../../../../engine/reference/commandline/commit/"><em>change the command that a container runs</em></a>. There is additional detailed information about <code>docker run</code> in the <a href="../../../../engine/reference/run/">Docker run reference</a>.</p>
<p>For information on connecting a container to a network, see the <a href="../../../../engine/userguide/networking/">&ldquo;<em>Docker network overview</em>&ldquo;</a>.</p>
<h2 id="examples">Examples</h2>
<h3 id="assign-name-and-allocate-pseudo-tty-name-it">Assign name and allocate pseudo-TTY (--name, -it)</h3>
<pre><code>$ docker run --name test -it debian
root@d6c0fe130dba:/# exit 13
$ echo $?
13
$ docker ps -a | grep test
d6c0fe130dba debian:7 &quot;/bin/bash&quot; 26 seconds ago Exited (13) 17 seconds ago test
</code></pre>
<p>This example runs a container named <code>test</code> using the <code>debian:latest</code>
image. The <code>-it</code> instructs Docker to allocate a pseudo-TTY connected to
the container&rsquo;s stdin; creating an interactive <code>bash</code> shell in the container.
In the example, the <code>bash</code> shell is quit by entering
<code>exit 13</code>. This exit code is passed on to the caller of
<code>docker run</code>, and is recorded in the <code>test</code> container&rsquo;s metadata.</p>
<h3 id="capture-container-id-cidfile">Capture container ID (--cidfile)</h3>
<pre><code>$ docker run --cidfile /tmp/docker_test.cid ubuntu echo &quot;test&quot;
</code></pre>
<p>This will create a container and print <code>test</code> to the console. The <code>cidfile</code>
flag makes Docker attempt to create a new file and write the container ID to it.
If the file exists already, Docker will return an error. Docker will close this
file when <code>docker run</code> exits.</p>
<h3 id="full-container-capabilities-privileged">Full container capabilities (--privileged)</h3>
<pre><code>$ docker run -t -i --rm ubuntu bash
root@bc338942ef20:/# mount -t tmpfs none /mnt
mount: permission denied
</code></pre>
<p>This will <em>not</em> work, because by default, most potentially dangerous kernel
capabilities are dropped; including <code>cap_sys_admin</code> (which is required to mount
filesystems). However, the <code>--privileged</code> flag will allow it to run:</p>
<pre><code>$ docker run -t -i --privileged ubuntu bash
root@50e3f57e16e6:/# mount -t tmpfs none /mnt
root@50e3f57e16e6:/# df -h
Filesystem Size Used Avail Use% Mounted on
none 1.9G 0 1.9G 0% /mnt
</code></pre>
<p>The <code>--privileged</code> flag gives <em>all</em> capabilities to the container, and it also
lifts all the limitations enforced by the <code>device</code> cgroup controller. In other
words, the container can then do almost everything that the host can do. This
flag exists to allow special use-cases, like running Docker within Docker.</p>
<h3 id="set-working-directory-w">Set working directory (-w)</h3>
<pre><code>$ docker run -w /path/to/dir/ -i -t ubuntu pwd
</code></pre>
<p>The <code>-w</code> lets the command being executed inside directory given, here
<code>/path/to/dir/</code>. If the path does not exists it is created inside the container.</p>
<h3 id="mount-tmpfs-tmpfs">Mount tmpfs (--tmpfs)</h3>
<pre><code>$ docker run -d --tmpfs /run:rw,noexec,nosuid,size=65536k my_image
</code></pre>
<p>The <code>--tmpfs</code> flag mounts an empty tmpfs into the container with the <code>rw</code>,
<code>noexec</code>, <code>nosuid</code>, <code>size=65536k</code> options.</p>
<h3 id="mount-volume-v-read-only">Mount volume (-v, --read-only)</h3>
<pre><code>$ docker run -v `pwd`:`pwd` -w `pwd` -i -t ubuntu pwd
</code></pre>
<p>The <code>-v</code> flag mounts the current working directory into the container. The <code>-w</code>
lets the command being executed inside the current working directory, by
changing into the directory to the value returned by <code>pwd</code>. So this
combination executes the command using the container, but inside the
current working directory.</p>
<pre><code>$ docker run -v /doesnt/exist:/foo -w /foo -i -t ubuntu bash
</code></pre>
<p>When the host directory of a bind-mounted volume doesn&rsquo;t exist, Docker
will automatically create this directory on the host for you. In the
example above, Docker will create the <code>/doesnt/exist</code>
folder before starting your container.</p>
<pre><code>$ docker run --read-only -v /icanwrite busybox touch /icanwrite here
</code></pre>
<p>Volumes can be used in combination with <code>--read-only</code> to control where
a container writes files. The <code>--read-only</code> flag mounts the container&rsquo;s root
filesystem as read only prohibiting writes to locations other than the
specified volumes for the container.</p>
<pre><code>$ docker run -t -i -v /var/run/docker.sock:/var/run/docker.sock -v /path/to/static-docker-binary:/usr/bin/docker busybox sh
</code></pre>
<p>By bind-mounting the docker unix socket and statically linked docker
binary (refer to <a href="../../../../engine/installation/binaries/#get-the-linux-binary">get the linux binary</a>),
you give the container the full access to create and manipulate the host&rsquo;s
Docker daemon.</p>
<h3 id="publish-or-expose-port-p-expose">Publish or expose port (-p, --expose)</h3>
<pre><code>$ docker run -p 127.0.0.1:80:8080 ubuntu bash
</code></pre>
<p>This binds port <code>8080</code> of the container to port <code>80</code> on <code>127.0.0.1</code> of the host
machine. The <a href="../../../../engine/userguide/networking/default_network/dockerlinks/">Docker User
Guide</a>
explains in detail how to manipulate ports in Docker.</p>
<pre><code>$ docker run --expose 80 ubuntu bash
</code></pre>
<p>This exposes port <code>80</code> of the container without publishing the port to the host
system&rsquo;s interfaces.</p>
<h3 id="set-environment-variables-e-env-env-file">Set environment variables (-e, --env, --env-file)</h3>
<pre><code>$ docker run -e MYVAR1 --env MYVAR2=foo --env-file ./env.list ubuntu bash
</code></pre>
<p>This sets simple (non-array) environmental variables in the container. For
illustration all three
flags are shown here. Where <code>-e</code>, <code>--env</code> take an environment variable and
value, or if no <code>=</code> is provided, then that variable&rsquo;s current value, set via
<code>export</code>, is passed through (i.e. <code>$MYVAR1</code> from the host is set to <code>$MYVAR1</code>
in the container). When no <code>=</code> is provided and that variable is not defined
in the client&rsquo;s environment then that variable will be removed from the
container&rsquo;s list of environment variables. All three flags, <code>-e</code>, <code>--env</code> and
<code>--env-file</code> can be repeated.</p>
<p>Regardless of the order of these three flags, the <code>--env-file</code> are processed
first, and then <code>-e</code>, <code>--env</code> flags. This way, the <code>-e</code> or <code>--env</code> will
override variables as needed.</p>
<pre><code>$ cat ./env.list
TEST_FOO=BAR
$ docker run --env TEST_FOO=&quot;This is a test&quot; --env-file ./env.list busybox env | grep TEST_FOO
TEST_FOO=This is a test
</code></pre>
<p>The <code>--env-file</code> flag takes a filename as an argument and expects each line
to be in the <code>VAR=VAL</code> format, mimicking the argument passed to <code>--env</code>. Comment
lines need only be prefixed with <code>#</code></p>
<p>An example of a file passed with <code>--env-file</code></p>
<pre><code>$ cat ./env.list
TEST_FOO=BAR
# this is a comment
TEST_APP_DEST_HOST=10.10.0.127
TEST_APP_DEST_PORT=8888
_TEST_BAR=FOO
TEST_APP_42=magic
helloWorld=true
123qwe=bar
org.spring.config=something
# pass through this variable from the caller
TEST_PASSTHROUGH
$ TEST_PASSTHROUGH=howdy docker run --env-file ./env.list busybox env
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOSTNAME=5198e0745561
TEST_FOO=BAR
TEST_APP_DEST_HOST=10.10.0.127
TEST_APP_DEST_PORT=8888
_TEST_BAR=FOO
TEST_APP_42=magic
helloWorld=true
TEST_PASSTHROUGH=howdy
HOME=/root
123qwe=bar
org.spring.config=something
$ docker run --env-file ./env.list busybox env
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOSTNAME=5198e0745561
TEST_FOO=BAR
TEST_APP_DEST_HOST=10.10.0.127
TEST_APP_DEST_PORT=8888
_TEST_BAR=FOO
TEST_APP_42=magic
helloWorld=true
TEST_PASSTHROUGH=
HOME=/root
123qwe=bar
org.spring.config=something
</code></pre>
<h3 id="set-metadata-on-container-l-label-label-file">Set metadata on container (-l, --label, --label-file)</h3>
<p>A label is a <code>key=value</code> pair that applies metadata to a container. To label a container with two labels:</p>
<pre><code>$ docker run -l my-label --label com.example.foo=bar ubuntu bash
</code></pre>
<p>The <code>my-label</code> key doesn&rsquo;t specify a value so the label defaults to an empty
string(<code>&quot;&quot;</code>). To add multiple labels, repeat the label flag (<code>-l</code> or <code>--label</code>).</p>
<p>The <code>key=value</code> must be unique to avoid overwriting the label value. If you
specify labels with identical keys but different values, each subsequent value
overwrites the previous. Docker uses the last <code>key=value</code> you supply.</p>
<p>Use the <code>--label-file</code> flag to load multiple labels from a file. Delimit each
label in the file with an EOL mark. The example below loads labels from a
labels file in the current directory:</p>
<pre><code>$ docker run --label-file ./labels ubuntu bash
</code></pre>
<p>The label-file format is similar to the format for loading environment
variables. (Unlike environment variables, labels are not visible to processes
running inside a container.) The following example illustrates a label-file
format:</p>
<pre><code>com.example.label1=&quot;a label&quot;
# this is a comment
com.example.label2=another\ label
com.example.label3
</code></pre>
<p>You can load multiple label-files by supplying multiple <code>--label-file</code> flags.</p>
<p>For additional information on working with labels, see <a href="../../../../engine/userguide/labels-custom-metadata/"><em>Labels - custom
metadata in Docker</em></a> in the Docker User
Guide.</p>
<h3 id="connect-a-container-to-a-network-net">Connect a container to a network (--net)</h3>
<p>When you start a container use the <code>--net</code> flag to connect it to a network.
This adds the <code>busybox</code> container to the <code>my-net</code> network.</p>
<pre><code class="language-bash">$ docker run -itd --net=my-net busybox
</code></pre>
<p>You can also choose the IP addresses for the container with <code>--ip</code> and <code>--ip6</code>
flags when you start the container on a user-defined network.</p>
<pre><code class="language-bash">$ docker run -itd --net=my-net --ip=10.10.9.75 busybox
</code></pre>
<p>If you want to add a running container to a network use the <code>docker network connect</code> subcommand.</p>
<p>You can connect multiple containers to the same network. Once connected, the
containers can communicate easily need only another container&rsquo;s IP address
or name. For <code>overlay</code> networks or custom plugins that support multi-host
connectivity, containers connected to the same multi-host network but launched
from different Engines can also communicate in this way.</p>
<p><strong>Note</strong>: Service discovery is unavailable on the default bridge network.
Containers can communicate via their IP addresses by default. To communicate
by name, they must be linked.</p>
<p>You can disconnect a container from a network using the <code>docker network
disconnect</code> command.</p>
<h3 id="mount-volumes-from-container-volumes-from">Mount volumes from container (--volumes-from)</h3>
<pre><code>$ docker run --volumes-from 777f7dc92da7 --volumes-from ba8c0c54f0f2:ro -i -t ubuntu pwd
</code></pre>
<p>The <code>--volumes-from</code> flag mounts all the defined volumes from the referenced
containers. Containers can be specified by repetitions of the <code>--volumes-from</code>
argument. The container ID may be optionally suffixed with <code>:ro</code> or <code>:rw</code> to
mount the volumes in read-only or read-write mode, respectively. By default,
the volumes are mounted in the same mode (read write or read only) as
the reference container.</p>
<p>Labeling systems like SELinux require that proper labels are placed on volume
content mounted into a container. Without a label, the security system might
prevent the processes running inside the container from using the content. By
default, Docker does not change the labels set by the OS.</p>
<p>To change the label in the container context, you can add either of two suffixes
<code>:z</code> or <code>:Z</code> to the volume mount. These suffixes tell Docker to relabel file
objects on the shared volumes. The <code>z</code> option tells Docker that two containers
share the volume content. As a result, Docker labels the content with a shared
content label. Shared volume labels allow all containers to read/write content.
The <code>Z</code> option tells Docker to label the content with a private unshared label.
Only the current container can use a private volume.</p>
<h3 id="attach-to-stdin-stdout-stderr-a">Attach to STDIN/STDOUT/STDERR (-a)</h3>
<p>The <code>-a</code> flag tells <code>docker run</code> to bind to the container&rsquo;s <code>STDIN</code>, <code>STDOUT</code>
or <code>STDERR</code>. This makes it possible to manipulate the output and input as
needed.</p>
<pre><code>$ echo &quot;test&quot; | docker run -i -a stdin ubuntu cat -
</code></pre>
<p>This pipes data into a container and prints the container&rsquo;s ID by attaching
only to the container&rsquo;s <code>STDIN</code>.</p>
<pre><code>$ docker run -a stderr ubuntu echo test
</code></pre>
<p>This isn&rsquo;t going to print anything unless there&rsquo;s an error because we&rsquo;ve
only attached to the <code>STDERR</code> of the container. The container&rsquo;s logs
still store what&rsquo;s been written to <code>STDERR</code> and <code>STDOUT</code>.</p>
<pre><code>$ cat somefile | docker run -i -a stdin mybuilder dobuild
</code></pre>
<p>This is how piping a file into a container could be done for a build.
The container&rsquo;s ID will be printed after the build is done and the build
logs could be retrieved using <code>docker logs</code>. This is
useful if you need to pipe a file or something else into a container and
retrieve the container&rsquo;s ID once the container has finished running.</p>
<h3 id="add-host-device-to-container-device">Add host device to container (--device)</h3>
<pre><code>$ docker run --device=/dev/sdc:/dev/xvdc --device=/dev/sdd --device=/dev/zero:/dev/nulo -i -t ubuntu ls -l /dev/{xvdc,sdd,nulo}
brw-rw---- 1 root disk 8, 2 Feb 9 16:05 /dev/xvdc
brw-rw---- 1 root disk 8, 3 Feb 9 16:05 /dev/sdd
crw-rw-rw- 1 root root 1, 5 Feb 9 16:05 /dev/nulo
</code></pre>
<p>It is often necessary to directly expose devices to a container. The <code>--device</code>
option enables that. For example, a specific block storage device or loop
device or audio device can be added to an otherwise unprivileged container
(without the <code>--privileged</code> flag) and have the application directly access it.</p>
<p>By default, the container will be able to <code>read</code>, <code>write</code> and <code>mknod</code> these devices.
This can be overridden using a third <code>:rwm</code> set of options to each <code>--device</code>
flag:</p>
<pre><code>$ docker run --device=/dev/sda:/dev/xvdc --rm -it ubuntu fdisk /dev/xvdc
Command (m for help): q
$ docker run --device=/dev/sda:/dev/xvdc:r --rm -it ubuntu fdisk /dev/xvdc
You will not be able to write the partition table.
Command (m for help): q
$ docker run --device=/dev/sda:/dev/xvdc:rw --rm -it ubuntu fdisk /dev/xvdc
Command (m for help): q
$ docker run --device=/dev/sda:/dev/xvdc:m --rm -it ubuntu fdisk /dev/xvdc
fdisk: unable to open /dev/xvdc: Operation not permitted
</code></pre>
<blockquote>
<p><strong>Note:</strong>
<code>--device</code> cannot be safely used with ephemeral devices. Block devices
that may be removed should not be added to untrusted containers with
<code>--device</code>.</p>
</blockquote>
<h3 id="restart-policies-restart">Restart policies (--restart)</h3>
<p>Use Docker&rsquo;s <code>--restart</code> to specify a container&rsquo;s <em>restart policy</em>. A restart
policy controls whether the Docker daemon restarts a container after exit.
Docker supports the following restart policies:</p>
<table>
<thead>
<tr>
<th>Policy</th>
<th>Result</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>no</strong></td>
<td>
Do not automatically restart the container when it exits. This is the
default.
</td>
</tr>
<tr>
<td>
<span style="white-space: nowrap">
<strong>on-failure</strong>[:max-retries]
</span>
</td>
<td>
Restart only if the container exits with a non-zero exit status.
Optionally, limit the number of restart retries the Docker
daemon attempts.
</td>
</tr>
<tr>
<td><strong>always</strong></td>
<td>
Always restart the container regardless of the exit status.
When you specify always, the Docker daemon will try to restart
the container indefinitely. The container will also always start
on daemon startup, regardless of the current state of the container.
</td>
</tr>
<tr>
<td><strong>unless-stopped</strong></td>
<td>
Always restart the container regardless of the exit status, but
do not start it on daemon startup if the container has been put
to a stopped state before.
</td>
</tr>
</tbody>
</table>
<pre><code>$ docker run --restart=always redis
</code></pre>
<p>This will run the <code>redis</code> container with a restart policy of <strong>always</strong>
so that if the container exits, Docker will restart it.</p>
<p>More detailed information on restart policies can be found in the
<a href="../../../../engine/reference/run/#restart-policies-restart">Restart Policies (--restart)</a>
section of the Docker run reference page.</p>
<h3 id="add-entries-to-container-hosts-file-add-host">Add entries to container hosts file (--add-host)</h3>
<p>You can add other hosts into a container&rsquo;s <code>/etc/hosts</code> file by using one or
more <code>--add-host</code> flags. This example adds a static address for a host named
<code>docker</code>:</p>
<pre><code>$ docker run --add-host=docker:10.180.0.1 --rm -it debian
$$ ping docker
PING docker (10.180.0.1): 48 data bytes
56 bytes from 10.180.0.1: icmp_seq=0 ttl=254 time=7.600 ms
56 bytes from 10.180.0.1: icmp_seq=1 ttl=254 time=30.705 ms
^C--- docker ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 7.600/19.152/30.705/11.553 ms
</code></pre>
<p>Sometimes you need to connect to the Docker host from within your
container. To enable this, pass the Docker host&rsquo;s IP address to
the container using the <code>--add-host</code> flag. To find the host&rsquo;s address,
use the <code>ip addr show</code> command.</p>
<p>The flags you pass to <code>ip addr show</code> depend on whether you are
using IPv4 or IPv6 networking in your containers. Use the following
flags for IPv4 address retrieval for a network device named <code>eth0</code>:</p>
<pre><code>$ HOSTIP=`ip -4 addr show scope global dev eth0 | grep inet | awk '{print \$2}' | cut -d / -f 1`
$ docker run --add-host=docker:${HOSTIP} --rm -it debian
</code></pre>
<p>For IPv6 use the <code>-6</code> flag instead of the <code>-4</code> flag. For other network
devices, replace <code>eth0</code> with the correct device name (for example <code>docker0</code>
for the bridge device).</p>
<h3 id="set-ulimits-in-container-ulimit">Set ulimits in container (--ulimit)</h3>
<p>Since setting <code>ulimit</code> settings in a container requires extra privileges not
available in the default container, you can set these using the <code>--ulimit</code> flag.
<code>--ulimit</code> is specified with a soft and hard limit as such:
<code>&lt;type&gt;=&lt;soft limit&gt;[:&lt;hard limit&gt;]</code>, for example:</p>
<pre><code>$ docker run --ulimit nofile=1024:1024 --rm debian sh -c &quot;ulimit -n&quot;
1024
</code></pre>
<blockquote>
<p><strong>Note:</strong>
If you do not provide a <code>hard limit</code>, the <code>soft limit</code> will be used
for both values. If no <code>ulimits</code> are set, they will be inherited from
the default <code>ulimits</code> set on the daemon. <code>as</code> option is disabled now.
In other words, the following script is not supported:
<code>$ docker run -it --ulimit as=1024 fedora /bin/bash</code></p>
</blockquote>
<p>The values are sent to the appropriate <code>syscall</code> as they are set.
Docker doesn&rsquo;t perform any byte conversion. Take this into account when setting the values.</p>
<h4 id="for-nproc-usage">For <code>nproc</code> usage</h4>
<p>Be careful setting <code>nproc</code> with the <code>ulimit</code> flag as <code>nproc</code> is designed by Linux to set the
maximum number of processes available to a user, not to a container. For example, start four
containers with <code>daemon</code> user:</p>
<pre><code>docker run -d -u daemon --ulimit nproc=3 busybox top
docker run -d -u daemon --ulimit nproc=3 busybox top
docker run -d -u daemon --ulimit nproc=3 busybox top
docker run -d -u daemon --ulimit nproc=3 busybox top
</code></pre>
<p>The 4th container fails and reports &ldquo;[8] System error: resource temporarily unavailable&rdquo; error.
This fails because the caller set <code>nproc=3</code> resulting in the first three containers using up
the three processes quota set for the <code>daemon</code> user.</p>
<h3 id="stop-container-with-signal-stop-signal">Stop container with signal (--stop-signal)</h3>
<p>The <code>--stop-signal</code> flag sets the system call signal that will be sent to the container to exit.
This signal can be a valid unsigned number that matches a position in the kernel&rsquo;s syscall table, for instance 9,
or a signal name in the format SIGNAME, for instance SIGKILL.</p>
<h3 id="specify-isolation-technology-for-container-isolation">Specify isolation technology for container (--isolation)</h3>
<p>This option is useful in situations where you are running Docker containers on
Microsoft Windows. The <code>--isolation &lt;value&gt;</code> option sets a container&rsquo;s isolation
technology. On Linux, the only supported is the <code>default</code> option which uses
Linux namespaces. These two commands are equivalent on Linux:</p>
<pre><code>$ docker run -d busybox top
$ docker run -d --isolation default busybox top
</code></pre>
<p>On Microsoft Windows, can take any of these values:</p>
<table>
<thead>
<tr>
<th>Value</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>default</code></td>
<td>Use the value specified by the Docker daemon&rsquo;s <code>--exec-opt</code> . If the <code>daemon</code> does not specify an isolation technology, Microsoft Windows uses <code>process</code> as its default value.</td>
</tr>
<tr>
<td><code>process</code></td>
<td>Namespace isolation only.</td>
</tr>
<tr>
<td><code>hyperv</code></td>
<td>Hyper-V hypervisor partition-based isolation.</td>
</tr>
</tbody>
</table>
<p>In practice, when running on Microsoft Windows without a <code>daemon</code> option set, these two commands are equivalent:</p>
<pre><code>$ docker run -d --isolation default busybox top
$ docker run -d --isolation process busybox top
</code></pre>
<p>If you have set the <code>--exec-opt isolation=hyperv</code> option on the Docker <code>daemon</code>, any of these commands also result in <code>hyperv</code> isolation:</p>
<pre><code>$ docker run -d --isolation default busybox top
$ docker run -d --isolation hyperv busybox top
</code></pre>
</article>
</section>
</div>
<div id="toc" class="large-3 columns toc ">
On this page:
<nav id="TableOfContents">
<ul>
<li><a href="#run">run</a>
<ul>
<li><a href="#examples">Examples</a>
<ul>
<li><a href="#assign-name-and-allocate-pseudo-tty-name-it">Assign name and allocate pseudo-TTY (--name, -it)</a></li>
<li><a href="#capture-container-id-cidfile">Capture container ID (--cidfile)</a></li>
<li><a href="#full-container-capabilities-privileged">Full container capabilities (--privileged)</a></li>
<li><a href="#set-working-directory-w">Set working directory (-w)</a></li>
<li><a href="#mount-tmpfs-tmpfs">Mount tmpfs (--tmpfs)</a></li>
<li><a href="#mount-volume-v-read-only">Mount volume (-v, --read-only)</a></li>
<li><a href="#publish-or-expose-port-p-expose">Publish or expose port (-p, --expose)</a></li>
<li><a href="#set-environment-variables-e-env-env-file">Set environment variables (-e, --env, --env-file)</a></li>
<li><a href="#set-metadata-on-container-l-label-label-file">Set metadata on container (-l, --label, --label-file)</a></li>
<li><a href="#connect-a-container-to-a-network-net">Connect a container to a network (--net)</a></li>
<li><a href="#mount-volumes-from-container-volumes-from">Mount volumes from container (--volumes-from)</a></li>
<li><a href="#attach-to-stdin-stdout-stderr-a">Attach to STDIN/STDOUT/STDERR (-a)</a></li>
<li><a href="#add-host-device-to-container-device">Add host device to container (--device)</a></li>
<li><a href="#restart-policies-restart">Restart policies (--restart)</a></li>
<li><a href="#add-entries-to-container-hosts-file-add-host">Add entries to container hosts file (--add-host)</a></li>
<li><a href="#set-ulimits-in-container-ulimit">Set ulimits in container (--ulimit)</a>
<ul>
<li><a href="#for-nproc-usage">For <code>nproc</code> usage</a></li>
</ul></li>
<li><a href="#stop-container-with-signal-stop-signal">Stop container with signal (--stop-signal)</a></li>
<li><a href="#specify-isolation-technology-for-container-isolation">Specify isolation technology for container (--isolation)</a></li>
</ul></li>
</ul></li>
</ul>
</nav>
</div>
</div>
<footer class="main-footer">
<div class="row">
</div>
<div class="row">
</div>
</footer>
<link rel="stylesheet" href="../../../../highlight/styles/github.css">
<script src="../../../../highlight/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script src="../../../../dist/assets/js/all.js"></script>
<script>
$( 'nav li:has(ul)' ).doubleTapToGo();
</script>
<script>
;(function ( $, window, document, undefined ) {
var pluginName = 'accordion',
defaults = {
transitionSpeed: 300,
transitionEasing: 'ease',
controlElement: '[data-control]',
contentElement: '[data-content]',
groupElement: '[data-accordion-group]',
singleOpen: true
};
function Accordion(element, options) {
this.element = element;
this.options = $.extend({}, defaults, options);
this._defaults = defaults;
this._name = pluginName;
this.init();
}
Accordion.prototype.init = function () {
var self = this,
opts = self.options;
var $accordion = $(self.element),
$controls = $accordion.find('> ' + opts.controlElement),
$content = $accordion.find('> ' + opts.contentElement);
var accordionParentsQty = $accordion.parents('[data-accordion]').length,
accordionHasParent = accordionParentsQty > 0;
var closedCSS = { 'max-height': 0, 'overflow': 'hidden' };
var CSStransitions = supportsTransitions();
function debounce(func, threshold, execAsap) {
var timeout;
return function debounced() {
var obj = this,
args = arguments;
function delayed() {
if (!execAsap) func.apply(obj, args);
timeout = null;
};
if (timeout) clearTimeout(timeout);
else if (execAsap) func.apply(obj, args);
timeout = setTimeout(delayed, threshold || 100);
};
}
function supportsTransitions() {
var b = document.body || document.documentElement,
s = b.style,
p = 'transition';
if (typeof s[p] == 'string') {
return true;
}
var v = ['Moz', 'webkit', 'Webkit', 'Khtml', 'O', 'ms'];
p = 'Transition';
for (var i=0; i<v.length; i++) {
if (typeof s[v[i] + p] == 'string') {
return true;
}
}
return false;
}
function requestAnimFrame(cb) {
if(window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame) {
return requestAnimationFrame(cb) ||
webkitRequestAnimationFrame(cb) ||
mozRequestAnimationFrame(cb);
} else {
return setTimeout(cb, 1000 / 60);
}
}
function toggleTransition($el, remove) {
if(!remove) {
$content.css({
'-webkit-transition': 'max-height ' + opts.transitionSpeed + 'ms ' + opts.transitionEasing,
'transition': 'max-height ' + opts.transitionSpeed + 'ms ' + opts.transitionEasing
});
} else {
$content.css({
'-webkit-transition': '',
'transition': ''
});
}
}
function calculateHeight($el) {
var height = 0;
$el.children().each(function() {
height = height + $(this).outerHeight(true);
});
$el.data('oHeight', height);
}
function updateParentHeight($parentAccordion, $currentAccordion, qty, operation) {
var $content = $parentAccordion.filter('.open').find('> [data-content]'),
$childs = $content.find('[data-accordion].open > [data-content]'),
$matched;
if(!opts.singleOpen) {
$childs = $childs.not($currentAccordion.siblings('[data-accordion].open').find('> [data-content]'));
}
$matched = $content.add($childs);
if($parentAccordion.hasClass('open')) {
$matched.each(function() {
var currentHeight = $(this).data('oHeight');
switch (operation) {
case '+':
$(this).data('oHeight', currentHeight + qty);
break;
case '-':
$(this).data('oHeight', currentHeight - qty);
break;
default:
throw 'updateParentHeight method needs an operation';
}
$(this).css('max-height', $(this).data('oHeight'));
});
}
}
function refreshHeight($accordion) {
if($accordion.hasClass('open')) {
var $content = $accordion.find('> [data-content]'),
$childs = $content.find('[data-accordion].open > [data-content]'),
$matched = $content.add($childs);
calculateHeight($matched);
$matched.css('max-height', $matched.data('oHeight'));
}
}
function closeAccordion($accordion, $content) {
$accordion.trigger('accordion.close');
if(CSStransitions) {
if(accordionHasParent) {
var $parentAccordions = $accordion.parents('[data-accordion]');
updateParentHeight($parentAccordions, $accordion, $content.data('oHeight'), '-');
}
$content.css(closedCSS);
$accordion.removeClass('open');
} else {
$content.css('max-height', $content.data('oHeight'));
$content.animate(closedCSS, opts.transitionSpeed);
$accordion.removeClass('open');
}
}
function openAccordion($accordion, $content) {
$accordion.trigger('accordion.open');
if(CSStransitions) {
toggleTransition($content);
if(accordionHasParent) {
var $parentAccordions = $accordion.parents('[data-accordion]');
updateParentHeight($parentAccordions, $accordion, $content.data('oHeight'), '+');
}
requestAnimFrame(function() {
$content.css('max-height', $content.data('oHeight'));
});
$accordion.addClass('open');
} else {
$content.animate({
'max-height': $content.data('oHeight')
}, opts.transitionSpeed, function() {
$content.css({'max-height': 'none'});
});
$accordion.addClass('open');
}
}
function closeSiblingAccordions($accordion) {
var $accordionGroup = $accordion.closest(opts.groupElement);
var $siblings = $accordion.siblings('[data-accordion]').filter('.open'),
$siblingsChildren = $siblings.find('[data-accordion]').filter('.open');
var $otherAccordions = $siblings.add($siblingsChildren);
$otherAccordions.each(function() {
var $accordion = $(this),
$content = $accordion.find(opts.contentElement);
closeAccordion($accordion, $content);
});
$otherAccordions.removeClass('open');
}
function toggleAccordion() {
var isAccordionGroup = (opts.singleOpen) ? $accordion.parents(opts.groupElement).length > 0 : false;
calculateHeight($content);
if(isAccordionGroup) {
closeSiblingAccordions($accordion);
}
if($accordion.hasClass('open')) {
closeAccordion($accordion, $content);
} else {
openAccordion($accordion, $content);
}
}
function addEventListeners() {
$controls.on('click', toggleAccordion);
$controls.on('accordion.toggle', function() {
if(opts.singleOpen && $controls.length > 1) {
return false;
}
toggleAccordion();
});
$(window).on('resize', debounce(function() {
refreshHeight($accordion);
}));
}
function setup() {
$content.each(function() {
var $curr = $(this);
if($curr.css('max-height') != 0) {
if(!$curr.closest('[data-accordion]').hasClass('open')) {
$curr.css({ 'max-height': 0, 'overflow': 'hidden' });
} else {
toggleTransition($curr);
calculateHeight($curr);
$curr.css('max-height', $curr.data('oHeight'));
}
}
});
if(!$accordion.attr('data-accordion')) {
$accordion.attr('data-accordion', '');
$accordion.find(opts.controlElement).attr('data-control', '');
$accordion.find(opts.contentElement).attr('data-content', '');
}
}
setup();
addEventListeners();
};
$.fn[pluginName] = function ( options ) {
return this.each(function () {
if (!$.data(this, 'plugin_' + pluginName)) {
$.data(this, 'plugin_' + pluginName,
new Accordion( this, options ));
}
});
}
})( jQuery, window, document );
$(document).ready(function() {
$('#multiple [data-accordion]').accordion({
singleOpen: false
});
});
</script>
<script src="/dist/assets/js/archive.js"></script>
<script type="text/javascript">
!function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on"];analytics.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t<analytics.methods.length;t++){var e=analytics.methods[t];analytics[e]=analytics.factory(e)}analytics.load=function(t){var e=document.createElement("script");e.type="text/javascript";e.async=!0;e.src=("https:"===document.location.protocol?"https://":"http://")+"cdn.segment.com/analytics.js/v1/"+t+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(e,n)};analytics.SNIPPET_VERSION="4.0.0";
analytics.load("IWj9D0UpZHZdZUZX9jl98PcpBFWBnBMy");
analytics.page();
}}();
</script>