mirror of
https://github.com/docker/docs.git
synced 2026-03-27 22:38:54 +07:00
731 lines
30 KiB
XML
731 lines
30 KiB
XML
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
|
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
|
<channel>
|
|
<title>Docker Docs</title>
|
|
<link>http://localhost/</link>
|
|
<description>Recent content on Docker Docs</description>
|
|
<generator>Hugo -- gohugo.io</generator>
|
|
<language>en-us</language>
|
|
<atom:link href="http://localhost/index.xml" rel="self" type="application/rss+xml" />
|
|
|
|
<item>
|
|
<title></title>
|
|
<link>http://localhost/compose/README/</link>
|
|
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
|
|
|
<guid>http://localhost/compose/README/</guid>
|
|
<description>
|
|
|
|
<h1 id="contributing-to-the-docker-compose-documentation">Contributing to the Docker Compose documentation</h1>
|
|
|
|
<p>The documentation in this directory is part of the <a href="https://docs.docker.com">https://docs.docker.com</a> website. Docker uses <a href="http://gohugo.io/overview/introduction/">the Hugo static generator</a> to convert project Markdown files to a static HTML site.</p>
|
|
|
|
<p>You don&rsquo;t need to be a Hugo expert to contribute to the compose documentation. If you are familiar with Markdown, you can modify the content in the <code>docs</code> files.</p>
|
|
|
|
<p>If you want to add a new file or change the location of the document in the menu, you do need to know a little more.</p>
|
|
|
|
<h2 id="documentation-contributing-workflow">Documentation contributing workflow</h2>
|
|
|
|
<ol>
|
|
<li><p>Edit a Markdown file in the tree.</p></li>
|
|
|
|
<li><p>Save your changes.</p></li>
|
|
|
|
<li><p>Make sure you are in the <code>docs</code> subdirectory.</p></li>
|
|
|
|
<li><p>Build the documentation.</p>
|
|
|
|
<pre><code>$ make docs
|
|
---&gt; ffcf3f6c4e97
|
|
Removing intermediate container a676414185e8
|
|
Successfully built ffcf3f6c4e97
|
|
docker run --rm -it -e AWS_S3_BUCKET -e NOCACHE -p 8000:8000 -e DOCKERHOST &quot;docs-base:test-tooling&quot; hugo server --port=8000 --baseUrl=192.168.59.103 --bind=0.0.0.0
|
|
ERROR: 2015/06/13 MenuEntry's .Url is deprecated and will be removed in Hugo 0.15. Use .URL instead.
|
|
0 of 4 drafts rendered
|
|
0 future content
|
|
12 pages created
|
|
0 paginator pages created
|
|
0 tags created
|
|
0 categories created
|
|
in 55 ms
|
|
Serving pages from /docs/public
|
|
Web Server is available at http://0.0.0.0:8000/
|
|
Press Ctrl+C to stop
|
|
</code></pre></li>
|
|
|
|
<li><p>Open the available server in your browser.</p>
|
|
|
|
<p>The documentation server has the complete menu but only the Docker Compose
|
|
documentation resolves. You can&rsquo;t access the other project docs from this
|
|
localized build.</p></li>
|
|
</ol>
|
|
|
|
<h2 id="tips-on-hugo-metadata-and-menu-positioning">Tips on Hugo metadata and menu positioning</h2>
|
|
|
|
<p>The top of each Docker Compose documentation file contains TOML metadata. The metadata is commented out to prevent it from appearing in GitHub.</p>
|
|
|
|
<pre><code>&lt;!--[metadata]&gt;
|
|
+++
|
|
title = &quot;Extending services in Compose&quot;
|
|
description = &quot;How to use Docker Compose's extends keyword to share configuration between files and projects&quot;
|
|
keywords = [&quot;fig, composition, compose, docker, orchestration, documentation, docs&quot;]
|
|
[menu.main]
|
|
parent=&quot;smn_workw_compose&quot;
|
|
weight=2
|
|
+++
|
|
&lt;![end-metadata]--&gt;
|
|
</code></pre>
|
|
|
|
<p>The metadata alone has this structure:</p>
|
|
|
|
<pre><code>+++
|
|
title = &quot;Extending services in Compose&quot;
|
|
description = &quot;How to use Docker Compose's extends keyword to share configuration between files and projects&quot;
|
|
keywords = [&quot;fig, composition, compose, docker, orchestration, documentation, docs&quot;]
|
|
[menu.main]
|
|
parent=&quot;smn_workw_compose&quot;
|
|
weight=2
|
|
+++
|
|
</code></pre>
|
|
|
|
<p>The <code>[menu.main]</code> section refers to navigation defined <a href="https://github.com/docker/docs-base/blob/hugo/config.toml">in the main Docker menu</a>. This metadata says <em>add a menu item called</em> Extending services in Compose <em>to the menu with the</em> <code>smn_workdw_compose</code> <em>identifier</em>. If you locate the menu in the configuration, you&rsquo;ll find <em>Create multi-container applications</em> is the menu title.</p>
|
|
|
|
<p>You can move an article in the tree by specifying a new parent. You can shift the location of the item by changing its weight. Higher numbers are heavier and shift the item to the bottom of menu. Low or no numbers shift it up.</p>
|
|
|
|
<h2 id="other-key-documentation-repositories">Other key documentation repositories</h2>
|
|
|
|
<p>The <code>docker/docs-base</code> repository contains <a href="https://github.com/docker/docs-base">the Hugo theme and menu configuration</a>. If you open the <code>Dockerfile</code> you&rsquo;ll see the <code>make docs</code> relies on this as a base image for building the Compose documentation.</p>
|
|
|
|
<p>The <code>docker/docs.docker.com</code> repository contains <a href="https://github.com/docker/docs.docker.com">build system for building the Docker documentation site</a>. Fork this repository to build the entire documentation site.</p>
|
|
</description>
|
|
</item>
|
|
|
|
<item>
|
|
<title></title>
|
|
<link>http://localhost/docker-hub/concepts/Om/</link>
|
|
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
|
|
|
<guid>http://localhost/docker-hub/concepts/Om/</guid>
|
|
<description>
|
|
|
|
<h1 id="om">Om</h1>
|
|
|
|
<p><a href="https://github.com/omcljs/om">Om</a> is a great example of the functional nature of React. Om has
|
|
a focus on immutability and functional programming concepts. It
|
|
achieves better performance than raw react through a focus on
|
|
functional paradigms.</p>
|
|
|
|
<h1 id="quickstart">Quickstart</h1>
|
|
|
|
<p>There is a basic Om <a href="https://github.com/omcljs/om/wiki/Basic-Tutorial">tutorial</a> which will help you get a grasp
|
|
on the differences between React and Om as well as how we might move
|
|
our tooling forward in the future.</p>
|
|
|
|
<h1 id="examples-of-om">Examples of Om</h1>
|
|
|
|
<p>CircleCI&rsquo;s <a href="https://github.com/circleci/frontend">Frontend</a> is open
|
|
source and includes examples such as build log streaming using
|
|
immutable data structures.</p>
|
|
</description>
|
|
</item>
|
|
|
|
<item>
|
|
<title></title>
|
|
<link>http://localhost/docker-hub/concepts/Flux/</link>
|
|
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
|
|
|
<guid>http://localhost/docker-hub/concepts/Flux/</guid>
|
|
<description>
|
|
|
|
<h1 id="flux">Flux</h1>
|
|
|
|
<p><a href="https://www.youtube.com/watch?v=i__969noyAM">Intro</a> to Flux</p>
|
|
|
|
<h1 id="fluxible">Fluxible</h1>
|
|
|
|
<p>We use Yahoo&rsquo;s <a href="https://github.com/yahoo/fluxible">Fluxible</a> as our Flux implementation.</p>
|
|
|
|
<h1 id="relay">Relay</h1>
|
|
|
|
<p><a href="https://www.youtube.com/watch?v=9sc8Pyc51uU">Relay</a></p>
|
|
</description>
|
|
</item>
|
|
|
|
<item>
|
|
<title></title>
|
|
<link>http://localhost/docker-hub/concepts/Immutability/</link>
|
|
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
|
|
|
<guid>http://localhost/docker-hub/concepts/Immutability/</guid>
|
|
<description>
|
|
|
|
<h1 id="immutability">Immutability</h1>
|
|
|
|
<p><a href="https://www.youtube.com/watch?v=I7IdS-PbEgI">Immutability</a> is a primary way in which we can enhance
|
|
the operational status of React</p>
|
|
|
|
<h2 id="immutable-js-libs">Immutable JS libs</h2>
|
|
|
|
<ul>
|
|
<li><a href="https://github.com/facebook/immutable-js">ImmutableJS</a> (Facebook)</li>
|
|
<li><a href="https://github.com/swannodette/mori">Mori</a> (Om)</li>
|
|
</ul>
|
|
</description>
|
|
</item>
|
|
|
|
<item>
|
|
<title></title>
|
|
<link>http://localhost/docker-hub/concepts/React-Native/</link>
|
|
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
|
|
|
<guid>http://localhost/docker-hub/concepts/React-Native/</guid>
|
|
<description>
|
|
|
|
<h1 id="react-native">React Native</h1>
|
|
|
|
<p><a href="https://www.youtube.com/watch?v=7rDsRXj9-cU">React Native</a> is</p>
|
|
</description>
|
|
</item>
|
|
|
|
<item>
|
|
<title></title>
|
|
<link>http://localhost/docker-hub/concepts/React-Router/</link>
|
|
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
|
|
|
<guid>http://localhost/docker-hub/concepts/React-Router/</guid>
|
|
<description>
|
|
|
|
<h1 id="react-router">React Router</h1>
|
|
|
|
<p><a href="https://www.youtube.com/watch?v=XZfvW1a8Xac">react-router</a></p>
|
|
</description>
|
|
</item>
|
|
|
|
<item>
|
|
<title></title>
|
|
<link>http://localhost/docker-hub/developing/production--testing-builds/</link>
|
|
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
|
|
|
<guid>http://localhost/docker-hub/developing/production--testing-builds/</guid>
|
|
<description>
|
|
|
|
<h1 id="testing-production-builds">Testing Production Builds</h1>
|
|
|
|
<p>To build the production Image and run a container:</p>
|
|
|
|
<ol>
|
|
<li><code>make base</code></li>
|
|
<li><code>make prod</code></li>
|
|
<li><code>make copy-prod</code></li>
|
|
<li><code>cd .tmp &amp;&amp; docker build -t whatever .</code></li>
|
|
<li><code>docker run -ite ENV=production -e DEBUG=* -p 7001:3000 whatever</code></li>
|
|
</ol>
|
|
|
|
<h3 id="make-base">make base</h3>
|
|
|
|
<p>installs dependencies, both local (<code>docker-ux</code> and <code>hub-js-sdk</code>) and
|
|
remote (<code>package.json</code>). If you modify anything in either of the local
|
|
projects or the <code>package.json</code>, you will have to re-run this step.</p>
|
|
|
|
<h3 id="make-prod">make prod</h3>
|
|
|
|
<p>builds the production application into a <code>.tmp</code> folder inside the
|
|
container. Run this step if you&rsquo;ve edited code in the hub2
|
|
application.</p>
|
|
|
|
<h3 id="make-copy-prod">make copy-prod</h3>
|
|
|
|
<p>copies the resulting folder out of a running container (the running
|
|
container is created from the <code>make prod</code> image). The folder will be
|
|
placed at <code>hub2demo/.tmp</code>.</p>
|
|
|
|
<h3 id="docker-build">docker build</h3>
|
|
|
|
<p>will build the actual production image. This should be very similar to
|
|
<code>bagel/hub-prod</code>, except you&rsquo;ve built it yourself instead of running
|
|
it through the CI system.</p>
|
|
|
|
<h3 id="docker-run">docker run</h3>
|
|
|
|
<p>creates and runs a new container based on the production image. We use
|
|
environment variables for a few things such as <code>debug</code> logs.</p>
|
|
</description>
|
|
</item>
|
|
|
|
<item>
|
|
<title></title>
|
|
<link>http://localhost/docker-hub/concepts/React/</link>
|
|
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
|
|
|
<guid>http://localhost/docker-hub/concepts/React/</guid>
|
|
<description>
|
|
|
|
<h1 id="react">React</h1>
|
|
|
|
<p>React is a library from Facebook that uses an immediate-mode rendering
|
|
pattern much like Doom&rsquo;s. It brings JavaScript in a functional
|
|
programming direction enabling the use of JS functions as the primary
|
|
unit in applications. React also creates a foundation for more
|
|
functional programming concepts such as immutability and purity. These
|
|
&ldquo;optimizations&rdquo; can make rendering faster, debugging easier and enable
|
|
more advanced techniques such as rendering of components through
|
|
<a href="http://en.wikipedia.org/wiki/QuickCheck">Quickcheck</a> semantics.</p>
|
|
|
|
<p><a href="https://www.youtube.com/watch?v=nYkdrAPrdcw#t=224">Rethinking Web App Development at Facebook</a></p>
|
|
|
|
<h2 id="useful-react-links">Useful React Links</h2>
|
|
|
|
<ul>
|
|
<li><a href="http://facebook.github.io/react/docs/getting-started.html">Getting Started</a></li>
|
|
<li><a href="http://react-components.com/">react-components search</a></li>
|
|
<li><a href="http://facebook.github.io/react/docs/videos.html">Videos and Talks</a></li>
|
|
<li><a href="https://github.com/lantiga/react.hiccup">hiccup</a></li>
|
|
</ul>
|
|
|
|
<h2 id="key-concepts">Key Concepts</h2>
|
|
|
|
<h3 id="virtual-dom">Virtual Dom</h3>
|
|
|
|
<p>React Components render to an intermediate DOM representation which
|
|
then diffs against previous iterations and inserts minimal changes
|
|
into the actual DOM. (This is a loose description of what actually
|
|
happens). Virtual DOM is not exclusive to React and has other
|
|
implementations such as <a href="https://github.com/Matt-Esch/virtual-dom">virtual-dom</a>.</p>
|
|
|
|
<h4 id="diffing">Diffing</h4>
|
|
|
|
<p><a href="http://calendar.perfplanet.com/2013/diff/">React&rsquo;s Diffing Algorithm</a>
|
|
applies heuristics to tell when to re-render components. These
|
|
heuristics bring complexity down from <code>O(n^3)</code> to <code>O(n)</code>.</p>
|
|
|
|
<p>In addition we have lifecycle events such as <code>shouldComponentUpdate</code>
|
|
to manually declare how far down the tree we should go to render new
|
|
data. This is especially useful for integration with existing
|
|
infrastructure such as D3.js where we don&rsquo;t actually want React to
|
|
manage the DOM for us.</p>
|
|
|
|
<h3 id="props-vs-state">Props vs State</h3>
|
|
|
|
<p>React has <code>&quot;two&quot;</code> locations for data in a component. <code>this.props</code> and
|
|
<code>this.state</code>. Props are immutable and should contain only &ldquo;raw&rdquo;
|
|
data. Any computed properties should be computed in the <code>render()</code>
|
|
function. <code>this.state</code> is where we would store localized state. As
|
|
much as possible we should move away from <code>this.state</code> and use
|
|
<code>this.props</code> as much as possible. Extending React&rsquo;s immutable behavior
|
|
up into our data in this way allows us to write more pure functions
|
|
and take after the excellent <a href="./docker-hub/concepts/Om/">Om</a> library to achieve better
|
|
performance.</p>
|
|
|
|
<p>Stores are now the primary holders of State in our applications.</p>
|
|
|
|
<h4 id="prop-validation">Prop Validation</h4>
|
|
|
|
<p><a href="http://facebook.github.io/react/docs/reusable-components.html">Types</a>
|
|
should be declared for React Component props. This eases the load on
|
|
new people coming into the codebase and also eases debugging load
|
|
(Passing in invalid props in development will log informative errors).</p>
|
|
|
|
<h3 id="react-components">React Components</h3>
|
|
|
|
<p>React components are the modular unit of reusability in React
|
|
apps. Since React Components are just functions, this means that
|
|
functions are now the modular units in our applications.</p>
|
|
|
|
<h4 id="component-lifecycle">Component Lifecycle</h4>
|
|
|
|
<p>React Components have lifecycle events depicted here:</p>
|
|
|
|
<p><img src="./docker-hub/concepts/imgs/react-component-lifecycle.jpg" alt="img" /></p>
|
|
|
|
<h1 id="usage">Usage</h1>
|
|
|
|
<h2 id="dev-niceties">Dev Niceties</h2>
|
|
|
|
<p>When creating a new <code>React</code> component, it is important to set the
|
|
<code>displayName</code> so that the React Tools console (in Chrome, etc) can
|
|
tell which componenet is rendering. If this is not set, the component
|
|
will render as <code>&lt;Unknown model=&quot;..&quot;&gt;</code> in the developer tools.</p>
|
|
|
|
<pre><code class="language-JavaScript">var Layout = React.createClass({
|
|
|
|
displayName : 'MyLayout',
|
|
render : (...)
|
|
})
|
|
</code></pre>
|
|
|
|
<h2 id="rendering">Rendering</h2>
|
|
|
|
<p><code>render()</code> is for displaying data <em>only</em>. Do not store or edit <code>this.state</code>.
|
|
<code>render()</code> should return the same thing every time given the same input.</p>
|
|
|
|
<h2 id="jsx">JSX</h2>
|
|
|
|
<p>JSX is a <a href="http://facebook.github.io/jsx/">draft spec</a> extension to
|
|
ECMAScript and one option for specifying DOM and Components. <code>babel</code>
|
|
handles transpiling jsx to js for us.</p>
|
|
|
|
<h1 id="other-concepts">Other Concepts</h1>
|
|
|
|
<ul>
|
|
<li><a href="./docker-hub/concepts/Flux/">Flux</a></li>
|
|
<li><a href="./docker-hub/concepts/React-Native/">React Native</a></li>
|
|
<li><a href="./docker-hub/concepts/React-Router/">React Router</a></li>
|
|
<li><a href="./docker-hub/concepts/Immutability/">Immutability</a></li>
|
|
</ul>
|
|
</description>
|
|
</item>
|
|
|
|
<item>
|
|
<title></title>
|
|
<link>http://localhost/docker-hub/developing/gettingstarted--long-start/</link>
|
|
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
|
|
|
<guid>http://localhost/docker-hub/developing/gettingstarted--long-start/</guid>
|
|
<description>
|
|
|
|
<h1 id="longstart">Longstart</h1>
|
|
|
|
<h2 id="set-up-dns">Set up DNS</h2>
|
|
|
|
<p>This command is <code>dns</code> in <code>Makefile</code>. It sets up
|
|
<code>/etc/resolver/bagels.docker.com</code> so we can hit
|
|
<code>https://bagels.docker.com</code> in a browser. This is necessary to comply
|
|
with the CORS restrictions on the APIs.</p>
|
|
|
|
<pre><code class="language-bash">cd $PROJECT_ROOT
|
|
make dns
|
|
</code></pre>
|
|
|
|
<h2 id="clone-dependency-projects">Clone dependency projects</h2>
|
|
|
|
<p>This will clone <code>docker-ux</code> and <code>hub-js-sdk</code> into <code>./private-deps</code>. We
|
|
deploy the master branch of each, so it&rsquo;s good to check to make sure
|
|
these are up to date occasionally.</p>
|
|
|
|
<pre><code class="language-bash">make hub-deps
|
|
</code></pre>
|
|
|
|
<h2 id="run-all-of-the-containers-in-the-background">Run all of the containers in the background</h2>
|
|
|
|
<p>This includes</p>
|
|
|
|
<ul>
|
|
<li>dnsmasq
|
|
|
|
<ul>
|
|
<li>local dns resolution for bagels.docker.com</li>
|
|
<li>To comply with API CORS Origin header</li>
|
|
</ul></li>
|
|
<li>haproxy
|
|
|
|
<ul>
|
|
<li>SSL Offloading</li>
|
|
<li>To handle routing domains to containers from dnsmasq</li>
|
|
</ul></li>
|
|
<li>hub
|
|
|
|
<ul>
|
|
<li>Hub Frontend (development container)</li>
|
|
<li>Includes the environment to serve image assets, etc.</li>
|
|
</ul></li>
|
|
</ul>
|
|
|
|
<pre><code class="language-bash">docker-compose up -d
|
|
</code></pre>
|
|
|
|
<h1 id="run-the-developer-tools">Run the Developer Tools</h1>
|
|
|
|
<p>You will need the following:</p>
|
|
|
|
<ul>
|
|
<li>tmux</li>
|
|
<li>node (v0.10.x)</li>
|
|
<li>npm (&gt; v2)</li>
|
|
<li>flow (v0.8.0 or latest)</li>
|
|
<li></li>
|
|
</ul>
|
|
|
|
<pre><code class="language-bash">./startup-scripts/boot-dev-tmux.sh
|
|
</code></pre>
|
|
|
|
<h2 id="commands">Commands</h2>
|
|
|
|
<h3 id="flow-start"><code>flow start</code></h3>
|
|
|
|
<p>This is run by default by <code>./startup-scripts/boot-dev.sh</code>. This runs
|
|
the flow server in the background. To see the errors flow detects, you
|
|
must be inside the <code>hub</code> container and run <code>flow</code>.</p>
|
|
|
|
<h3 id="gulp-nodemon-dev"><code>gulp nodemon::dev</code></h3>
|
|
|
|
<p>This is run by default, it handles reloading/transpiling es6 and jsx
|
|
content on file changes.</p>
|
|
|
|
<h3 id="gulp-webpack"><code>gulp webpack</code></h3>
|
|
|
|
<p>This is a watch task that handles the client js. If you are
|
|
making changes, you will want to run this (probably via <code>gulp watch</code>).</p>
|
|
|
|
<h3 id="gulp-styles-dev"><code>gulp styles::dev</code></h3>
|
|
|
|
<p>Compiles sass to css. Is included in <code>gulp watch</code>.</p>
|
|
|
|
<h3 id="gulp-jscs"><code>gulp jscs</code></h3>
|
|
|
|
<p>Lints all of the code, skipping jsx sections while
|
|
including flow types and es6 syntax.</p>
|
|
</description>
|
|
</item>
|
|
|
|
<item>
|
|
<title></title>
|
|
<link>http://localhost/docker-hub/developing/react--components/</link>
|
|
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
|
|
|
<guid>http://localhost/docker-hub/developing/react--components/</guid>
|
|
<description>
|
|
|
|
<h1 id="creating-components">Creating Components</h1>
|
|
|
|
<pre><code class="language-javascript">// use strict by default
|
|
'use strict';
|
|
|
|
/**
|
|
* ES6 import syntax.
|
|
*/
|
|
import React = from 'react';
|
|
import Router, { Link, RouteHandler } = from 'react-router';
|
|
import JWTStore from '../stores/JWTStore';
|
|
|
|
var UserPage = React.createClass({
|
|
|
|
/**
|
|
* displayName is used mostly in error messages, but also
|
|
* in the React chrome extension. Always include a
|
|
* displayName.
|
|
*/
|
|
displayName: 'UserPage',
|
|
|
|
/**
|
|
* The render function is required. It must return a valid
|
|
* React Element. We are using ES6 syntax to declare the
|
|
* function.
|
|
*/
|
|
render() {
|
|
return (
|
|
/**
|
|
* jsx is compiled to function calls. Due to this, there
|
|
* must always be a *single* Element returned in the
|
|
* render() call
|
|
*/
|
|
&lt;div&gt;
|
|
This will be the base wrapper of the 'Users' page where either your or another users profile will appear &lt;br/&gt;
|
|
This will let you see your public facing page at /u/username/ too &lt;br/&gt;
|
|
'Your' homepage/dashboard will live at /home/&lt;br/&gt;
|
|
/**
|
|
* RouteHandler comes from React-Router and displays
|
|
* the sub-route's content (more on this in Routing)
|
|
*/
|
|
&lt;RouteHandler /&gt;
|
|
&lt;/div&gt;
|
|
);
|
|
}
|
|
});
|
|
|
|
var RootUser = React.createClass({
|
|
displayName: 'RootUser',
|
|
render() {
|
|
return (
|
|
&lt;div&gt;
|
|
&lt;p/&gt;
|
|
This is root user page.&lt;br/&gt;
|
|
When not looking at a specific user or an owned image&lt;br/&gt;
|
|
This will show a list of repos/images owned by the root user &lt;br/&gt;
|
|
/**
|
|
* Link is from React-Router and requires the params
|
|
* to be set as an object. The `repo` route is
|
|
* designated in Routes.jsx
|
|
*/
|
|
&lt;Link to='repo' params={{user:'testing', splat:'1234'}}&gt;This could be a image box of some sort&lt;/Link&gt;
|
|
&lt;/div&gt;
|
|
);
|
|
}
|
|
});
|
|
|
|
var User = React.createClass({
|
|
displayName: 'User',
|
|
/**
|
|
* contextTypes are required to access Fluxible or React-Router
|
|
* functions. In this case, we specify that React-Router is
|
|
* required for this Element.
|
|
*/
|
|
contextTypes: {
|
|
router: React.PropTypes.func.isRequired
|
|
},
|
|
render() {
|
|
return (
|
|
&lt;div&gt;
|
|
&lt;p/&gt;
|
|
/**
|
|
* Using the router from contextTypes:
|
|
*/
|
|
This is the UID: {this.context.router.getCurrentParams().uid}&lt;br/&gt;
|
|
This is main user page.&lt;br/&gt;
|
|
This will show a list of repos/images owned by the user &lt;br/&gt;
|
|
&lt;RouteHandler /&gt;
|
|
&lt;/div&gt;
|
|
);
|
|
}
|
|
});
|
|
|
|
/**
|
|
* Only export one Element per file.
|
|
*/
|
|
module.exports = {
|
|
userpage: UserPage,
|
|
rootuser: RootUser,
|
|
user: User
|
|
};
|
|
</code></pre>
|
|
</description>
|
|
</item>
|
|
|
|
<item>
|
|
<title></title>
|
|
<link>http://localhost/docker-hub/developing/react-router--adding-routes/</link>
|
|
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
|
|
|
<guid>http://localhost/docker-hub/developing/react-router--adding-routes/</guid>
|
|
<description>
|
|
|
|
<h1 id="adding-routes">Adding Routes</h1>
|
|
</description>
|
|
</item>
|
|
|
|
<item>
|
|
<title></title>
|
|
<link>http://localhost/docker-hub/developing/saas-config/</link>
|
|
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
|
|
|
<guid>http://localhost/docker-hub/developing/saas-config/</guid>
|
|
<description>
|
|
|
|
<h1 id="saas-config">saas-config</h1>
|
|
|
|
<p>You can swap environments by doing two things:</p>
|
|
|
|
<p>In tmux:</p>
|
|
|
|
<pre><code>ENV=local gulp webpack
|
|
</code></pre>
|
|
|
|
<p>In <code>docker-compose.yml</code>:</p>
|
|
|
|
<pre><code>hub:
|
|
...
|
|
environment:
|
|
ENV: local
|
|
</code></pre>
|
|
</description>
|
|
</item>
|
|
|
|
<item>
|
|
<title></title>
|
|
<link>http://localhost/engine/articles/https/README/</link>
|
|
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
|
|
|
<guid>http://localhost/engine/articles/https/README/</guid>
|
|
<description><p>This is an initial attempt to make it easier to test the examples in the https.md
|
|
doc</p>
|
|
|
|
<p>at this point, it has to be a manual thing, and I&rsquo;ve been running it in boot2docker</p>
|
|
|
|
<p>so my process is</p>
|
|
|
|
<p>$ boot2docker ssh
|
|
$$ git clone <a href="https://github.com/docker/docker">https://github.com/docker/docker</a>
|
|
$$ cd docker/docs/articles/https
|
|
$$ make cert
|
|
lots of things to see and manually answer, as openssl wants to be interactive
|
|
<strong>NOTE:</strong> make sure you enter the hostname (<code>boot2docker</code> in my case) when prompted for <code>Computer Name</code>)
|
|
$$ sudo make run</p>
|
|
|
|
<p>start another terminal</p>
|
|
|
|
<p>$ boot2docker ssh
|
|
$$ cd docker/docs/articles/https
|
|
$$ make client</p>
|
|
|
|
<p>the last will connect first with <code>--tls</code> and then with <code>--tlsverify</code></p>
|
|
|
|
<p>both should succeed</p>
|
|
</description>
|
|
</item>
|
|
|
|
<item>
|
|
<title></title>
|
|
<link>http://localhost/engine/reference/api/README/</link>
|
|
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
|
|
|
<guid>http://localhost/engine/reference/api/README/</guid>
|
|
<description><p>This directory holds the authoritative specifications of APIs defined and implemented by Docker. Currently this includes:</p>
|
|
|
|
<ul>
|
|
<li>The remote API by which a docker node can be queried over HTTP</li>
|
|
<li>The registry API by which a docker node can download and upload
|
|
images for storage and sharing</li>
|
|
<li>The index search API by which a docker node can search the public
|
|
index for images to download</li>
|
|
<li>The docker.io OAuth and accounts API which 3rd party services can
|
|
use to access account information</li>
|
|
</ul>
|
|
</description>
|
|
</item>
|
|
|
|
<item>
|
|
<title></title>
|
|
<link>http://localhost/engine/security/apparmor/</link>
|
|
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
|
|
|
<guid>http://localhost/engine/security/apparmor/</guid>
|
|
<description>
|
|
|
|
<h2 id="apparmor-security-profiles-for-docker">AppArmor security profiles for Docker</h2>
|
|
|
|
<p>AppArmor (Application Armor) is a security module that allows a system
|
|
administrator to associate a security profile with each program. Docker
|
|
expects to find an AppArmor policy loaded and enforced.</p>
|
|
|
|
<p>Container profiles are loaded automatically by Docker. A profile
|
|
for the Docker Engine itself also exists and is installed
|
|
with the official <em>.deb</em> packages. Advanced users and package
|
|
managers may find the profile for <em>/usr/bin/docker</em> underneath
|
|
<a href="https://github.com/docker/docker/tree/master/contrib/apparmor">contrib/apparmor</a>
|
|
in the Docker Engine source repository.</p>
|
|
|
|
<h2 id="understand-the-policies">Understand the policies</h2>
|
|
|
|
<p>The <code>docker-default</code> profile the default for running
|
|
containers. It is moderately protective while
|
|
providing wide application compatibility.</p>
|
|
|
|
<p>The system&rsquo;s standard <code>unconfined</code> profile inherits all
|
|
system-wide policies, applying path-based policies
|
|
intended for the host system inside of containers.
|
|
This was the default for privileged containers
|
|
prior to Docker 1.8.</p>
|
|
|
|
<h2 id="overriding-the-profile-for-a-container">Overriding the profile for a container</h2>
|
|
|
|
<p>Users may override the AppArmor profile using the
|
|
<code>security-opt</code> option (per-container).</p>
|
|
|
|
<p>For example, the following explicitly specifies the default policy:</p>
|
|
|
|
<pre><code>$ docker run --rm -it --security-opt apparmor:docker-default hello-world
|
|
</code></pre>
|
|
</description>
|
|
</item>
|
|
|
|
</channel>
|
|
</rss> |