New build system of Hass.io (#3406)
* Update addon_config.markdown * Update addon_tutorial.markdown * add build.json * Update addon_config.markdown * Update addon_config.markdown * Update addon_testing.markdown * Create 2019-09-21-new-hassio-build-system.markdown * Update 2019-09-21-new-hassio-build-system.markdown * Update addon_config.markdown * Update addon_publishing.markdown * Update addon_publishing.markdown * Update and rename 2019-09-21-new-hassio-build-system.markdown to 2019-09-25-new-hassio-build-system.markdown * Update 2019-09-25-new-hassio-build-system.markdown * Update 2019-09-25-new-hassio-build-system.markdown * Update 2019-09-25-new-hassio-build-system.markdown * 📚 Improved spelling & grammar in the documentation * 📚 Replaced blebla.com by example.com * Update blog post
This commit is contained in:
parent
1e55848923
commit
a1a4ff28ee
6 changed files with 142 additions and 51 deletions
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
layout: page
|
||||
title: "Local add-on testing"
|
||||
description: "Instructions how to test your add-on locally."
|
||||
description: "Instructions on how to test your add-on locally."
|
||||
date: 2017-04-30 13:28
|
||||
sidebar: true
|
||||
comments: false
|
||||
|
@ -14,23 +14,24 @@ The fastest way to develop add-ons is by adding them to your local add-on reposi
|
|||
|
||||
Right now add-ons will work with images that are stored on Docker Hub (using `image` from add-on config). Without `image` inside local add-ons repository it to be built on the device.
|
||||
|
||||
## {% linkable_title Local run %}
|
||||
## {% linkable_title Local build %}
|
||||
|
||||
You can build an try the addon on your developer machine also. Move all addon stuff into a temp folder. Replace in the Dockerfile `%%BASE_IMAGE%%` with:
|
||||
You can build an try the addon on your developer machine also. Move all addon stuff into a temp folder. If you use `FROM $BUILD_FROM` you need set a base image with build args. Normally you can use follow base images:
|
||||
|
||||
- armhf: `homeassistant/armhf-base:latest`
|
||||
- aarch64: `homeassistant/aarch64-base:latest`
|
||||
- amd64: `homeassistant/amd64-base:latest`
|
||||
- i386: `homeassistant/i386-base:latest`
|
||||
|
||||
Add also a `LABEL io.hass.version="xy"` into your dockerfile.
|
||||
Use `docker` to build the test addon: `docker build -t local/my-test-addon .`
|
||||
Use `docker` to build the test addon: `docker build --build-arg BUILD_FROM="homeassistant/amd64-base:latest" -t local/my-test-addon .`
|
||||
|
||||
## {% linkable_title Local run %}
|
||||
|
||||
Create a new folder for data and add a test _options.json_ file. After that you can run your add-on with: `docker run --rm -v /tmp/my_test_data:/data -p PORT_STUFF_IF_NEEDED local/my-test-addon`
|
||||
|
||||
## {% linkable_title Logs %}
|
||||
|
||||
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.
|
||||
All stdout and stderr are redirected to the Docker logs. The logs can be fetched from the add-on page inside the Hass.io panel in Home Assistant.
|
||||
|
||||
[Samba add-on]: /addons/samba/
|
||||
[SSH add-on]: /addons/ssh/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue