update
This commit is contained in:
parent
827811d664
commit
8903a5508f
9 changed files with 49 additions and 31 deletions
26
yml.html
26
yml.html
|
|
@ -6,7 +6,7 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link href='http://fonts.googleapis.com/css?family=Lilita+One|Lato:300,400,700' rel='stylesheet' type='text/css'>
|
||||
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="css/fig.css?20140228081933111372101">
|
||||
<link rel="stylesheet" type="text/css" href="css/fig.css?20140303091963271416714">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
|
|
@ -22,26 +22,38 @@
|
|||
<p>Each service defined in <code>fig.yml</code> must specify exactly one of <code>image</code> or <code>build</code>. Other keys are optional, and are analogous to their <code>docker run</code> command-line counterparts.</p>
|
||||
|
||||
<p>As with <code>docker run</code>, options specified in the Dockerfile (e.g. <code>CMD</code>, <code>EXPOSE</code>, <code>VOLUME</code>, <code>ENV</code>) are respected by default - you don't need to specify them again in <code>fig.yml</code>.</p>
|
||||
<div class="highlight"><pre><code class="yaml language-yaml" data-lang="yaml"><span class="l-Scalar-Plain">-- Tag or partial image ID. Can be local or remote - Fig will attempt to pull if it doesn't exist locally.</span>
|
||||
<div class="highlight"><pre><code class="yaml language-yaml" data-lang="yaml"><span class="l-Scalar-Plain">-- Tag or partial image ID. Can be local or remote - Fig will attempt to pull</span>
|
||||
<span class="l-Scalar-Plain">-- if it doesn't exist locally.</span>
|
||||
<span class="l-Scalar-Plain">image</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">ubuntu</span>
|
||||
<span class="l-Scalar-Plain">image</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">orchardup/postgresql</span>
|
||||
<span class="l-Scalar-Plain">image</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">a4bc65fd</span>
|
||||
|
||||
<span class="l-Scalar-Plain">-- Path to a directory containing a Dockerfile. Fig will build and tag it with a generated name, and use that image thereafter.</span>
|
||||
<span class="l-Scalar-Plain">-- Path to a directory containing a Dockerfile. Fig will build and tag it with</span>
|
||||
<span class="l-Scalar-Plain">-- a generated name, and use that image thereafter.</span>
|
||||
<span class="l-Scalar-Plain">build</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">/path/to/build/dir</span>
|
||||
|
||||
<span class="l-Scalar-Plain">-- Override the default command.</span>
|
||||
<span class="l-Scalar-Plain">command</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">bundle exec thin -p 3000</span>
|
||||
|
||||
<span class="l-Scalar-Plain">-- Link to containers in another service (see "Communicating between containers").</span>
|
||||
<span class="l-Scalar-Plain">-- Link to containers in another service. Optionally specify an alternate name</span>
|
||||
<span class="l-Scalar-Plain">-- for the link, which will determine how environment variables are prefixed,</span>
|
||||
<span class="l-Scalar-Plain">-- e.g. "db" -> DB_1_PORT, "db:database" -> DATABASE_1_PORT</span>
|
||||
<span class="l-Scalar-Plain">links</span><span class="p-Indicator">:</span>
|
||||
<span class="p-Indicator">-</span> <span class="l-Scalar-Plain">db</span>
|
||||
<span class="p-Indicator">-</span> <span class="l-Scalar-Plain">db:database</span>
|
||||
<span class="p-Indicator">-</span> <span class="l-Scalar-Plain">redis</span>
|
||||
|
||||
<span class="l-Scalar-Plain">-- Expose ports. Either specify both ports (HOST:CONTAINER), or just the container port (a random host port will be chosen).</span>
|
||||
<span class="l-Scalar-Plain">-- Expose ports. Either specify both ports (HOST:CONTAINER), or just the</span>
|
||||
<span class="l-Scalar-Plain">-- container port (a random host port will be chosen).</span>
|
||||
<span class="l-Scalar-Plain">-- Note</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">When mapping ports in the HOST:CONTAINER format, you may experience</span>
|
||||
<span class="l-Scalar-Plain">-- erroneous results when using a container port lower than 60, because YAML</span>
|
||||
<span class="l-Scalar-Plain">-- will parse numbers in the format "xx:yy" as sexagesimal (base 60). For</span>
|
||||
<span class="l-Scalar-Plain">-- this reason, we recommend always explicitly specifying your port mappings</span>
|
||||
<span class="l-Scalar-Plain">-- as strings.</span>
|
||||
<span class="l-Scalar-Plain">ports</span><span class="p-Indicator">:</span>
|
||||
<span class="p-Indicator">-</span> <span class="l-Scalar-Plain">3000</span>
|
||||
<span class="p-Indicator">-</span> <span class="l-Scalar-Plain">8000:8000</span>
|
||||
<span class="p-Indicator">-</span> <span class="s">"3000"</span>
|
||||
<span class="p-Indicator">-</span> <span class="s">"8000:8000"</span>
|
||||
<span class="p-Indicator">-</span> <span class="s">"49100:22"</span>
|
||||
|
||||
<span class="l-Scalar-Plain">-- Map volumes from the host machine (HOST:CONTAINER).</span>
|
||||
<span class="l-Scalar-Plain">volumes</span><span class="p-Indicator">:</span>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue