Site updated at 2017-05-15 23:19:06 UTC

This commit is contained in:
Travis CI 2017-05-15 23:19:06 +00:00
parent 2c31673a27
commit 372fd6d0fe
26 changed files with 46 additions and 42 deletions

View file

@ -70,14 +70,15 @@
<p>The fastest way to develop add-ons is by adding them to your local add-on repository. To access your local add-on repository, install either the <a href="/addons/samba/">Samba add-on</a> or <a href="/addons/ssh/">SSH add-on</a>.</p>
<p>Right now add-ons will work with images that are stored on Docker Hub (using <code class="highlighter-rouge">image</code> from add-on config). Without <code class="highlighter-rouge">image</code> inside local add-ons repository it to be built on the device.</p>
<h2><a class="title-link" name="local-run" href="#local-run"></a> Local run</h2>
<p>You can build an try the addon on your developer machine also. Move all addon stuff into a temp folder. Replace in the Dockerfile: <code class="highlighter-rouge">%%VERSION%%</code> with your version and <code class="highlighter-rouge">%%BASE_IMAGE%%</code> with:</p>
<p>You can build an try the addon on your developer machine also. Move all addon stuff into a temp folder. Replace in the Dockerfile <code class="highlighter-rouge">%%BASE_IMAGE%%</code> with:</p>
<ul>
<li>armhf: <code class="highlighter-rouge">resin/armhf-alpine:3.5</code></li>
<li>aarch64: <code class="highlighter-rouge">resin/aarch64-alpine:3.5</code></li>
<li>amd64: <code class="highlighter-rouge">resin/amd64-alpine:3.5</code></li>
<li>i386: <code class="highlighter-rouge">resin/i386-alpine:3.5</code></li>
</ul>
<p>Use <code class="highlighter-rouge">docker</code> to build the test addon: <code class="highlighter-rouge">docker build -t local/my-test-addon .</code></p>
<p>Add also a <code class="highlighter-rouge">LABEL io.hass.version="xy"</code> into your dockerfile.
Use <code class="highlighter-rouge">docker</code> to build the test addon: <code class="highlighter-rouge">docker build -t local/my-test-addon .</code></p>
<p>Create a new folder for data and add a test <em>options.json</em> file. After that you can run your add-on with: <code class="highlighter-rouge">docker run --rm -v /tmp/my_test_data:/data -p PORT_STUFF_IF_NEEDED local/my-test-addon</code></p>
<h2><a class="title-link" name="logs" href="#logs"></a> Logs</h2>
<p>All stdout and stderr is redirected to the Docker logs. The logs can be fetched from the add-on page inside the Hass.io panel in Home Assistant.</p>