Site updated at 2017-09-26 07:14:23 UTC

This commit is contained in:
Travis CI 2017-09-26 07:14:23 +00:00
parent 80847eb95a
commit b723b0750d
415 changed files with 2329 additions and 1581 deletions

View file

@ -92,27 +92,16 @@
</span><span class="err">}</span><span class="w">
</span></code></pre>
</div>
<p>You can use <code class="highlighter-rouge"><span class="p">{</span><span class="err">arch</span><span class="p">}</span></code> inside the image name to support multiple architectures with 1 configuration file. It will be replaced with the architecture of the user when we load the image.</p>
<p>Hass.io assumes that the <code class="highlighter-rouge">master</code> branch of your add-on repository matches the latest tag on Docker Hub. When youre building a new version, its suggested that you use another branch, ie <code class="highlighter-rouge">build</code>. After you push the add-on to <a href="https://hub.docker.com/">Docker Hub</a>, you can merge this branch to master.</p>
<p>You can use <code class="highlighter-rouge"><span class="p">{</span><span class="err">arch</span><span class="p">}</span></code> inside the image name to support multiple architectures with 1 configuration file. It will be replaced with the architecture of the user when we load the image. If you use <code class="highlighter-rouge">Buildargs</code> you can use the <code class="highlighter-rouge">build.json</code> to overwrite our default args.</p>
<p>Hass.io assumes that the <code class="highlighter-rouge">master</code> branch of your add-on repository matches the latest tag on Docker Hub. When youre building a new version, its suggested that you use another branch, ie <code class="highlighter-rouge">build</code> or do it with a PR on GitHub. After you push the add-on to <a href="https://hub.docker.com/">Docker Hub</a>, you can merge this branch to master.</p>
<h2><a class="title-link" name="custom-add-ons" href="#custom-add-ons"></a> Custom Add-ons</h2>
<p>You need a Docker Hub account to make your own add-ons. Download our <a href="https://github.com/home-assistant/hassio-build/tree/master/build-scripts/addons">build script</a> and run one of the following commands.</p>
<p>You need a Docker Hub account to make your own add-ons. You can build your docker images with docker <code class="highlighter-rouge">build</code> command or use our script that make it simple. Pull our <a href="https://github.com/home-assistant/hassio-build/tree/master/builder">builder docker engine</a> and run one of the following commands.</p>
<p>For a git repository:</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="c"># Test only:</span>
./create_hassio_addon.sh -a amd64 -s addon-slug -r https://github.com/xy/addons -b branchname
<span class="c"># push to docker hub:</span>
./create_hassio_addon.sh -a amd64 -s addon-slug -r https://github.com/xy/addons -b branchname -p
<span class="c"># create for all supported arch:</span>
./create_addon_all.sh -s addon-slug -r https://github.com/xy/addons -b branchname -p
<div class="language-bash highlighter-rouge"><pre class="highlight"><code>docker run --rm --privileged -v ~/.docker:/root/docker homeassistant/amd64-builder --all -t addon-folder -r https://github.com/xy/addons -b branchname
</code></pre>
</div>
<p>For a local repository:</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="c"># Test only:</span>
./create_hassio_addon.sh -a amd64 -s addon-slug -l /home/xy/my_local_repo
<span class="c"># push to docker hub:</span>
./create_hassio_addon.sh -a amd64 -s addon-slug -l /home/xy/my_local_repo -p
<div class="language-bash highlighter-rouge"><pre class="highlight"><code>docker run --rm --privileged -v ~/.docker:/root/docker -v /my_addon:/data homeassistant/amd64-builder --all -t /data
</code></pre>
</div>
</article>