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:
Pascal Vizeli 2017-09-26 08:44:13 +02:00 committed by Paulus Schoutsen
parent 1e55848923
commit a1a4ff28ee
6 changed files with 142 additions and 51 deletions

View file

@ -38,35 +38,24 @@ All add-ons are simple docker containers. Inside your add-on `config.json` you s
}
```
You can use `{arch}` 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.
You can use `{arch}` 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 `Buildargs` you can use the `build.json` to overwrite our default args.
Hass.io assumes that the `master` branch of your add-on repository matches the latest tag on Docker Hub. When you're building a new version, it's suggested that you use another branch, ie `build`. After you push the add-on to [Docker Hub](https://hub.docker.com/), you can merge this branch to master.
Hass.io assumes that the `master` branch of your add-on repository matches the latest tag on Docker Hub. When you're building a new version, it's suggested that you use another branch, ie `build` or do it with a PR on GitHub. After you push the add-on to [Docker Hub](https://hub.docker.com/), you can merge this branch to master.
## {% linkable_title Custom Add-ons %}
You need a Docker Hub account to make your own add-ons. Download our [build script][builder] and run one of the following commands.
You need a Docker Hub account to make your own add-ons. You can build your docker images with docker `build` command or use our script that make it simple. Pull our [builder docker engine][builder] and run one of the following commands.
For a git repository:
```bash
# Test only:
./create_hassio_addon.sh -a amd64 -s addon-slug -r https://github.com/xy/addons -b branchname
# push to docker hub:
./create_hassio_addon.sh -a amd64 -s addon-slug -r https://github.com/xy/addons -b branchname -p
# create for all supported arch:
./create_addon_all.sh -s addon-slug -r https://github.com/xy/addons -b branchname -p
docker run --rm --privileged -v ~/.docker:/root/docker homeassistant/amd64-builder --all -t addon-folder -r https://github.com/xy/addons -b branchname
```
For a local repository:
```bash
# Test only:
./create_hassio_addon.sh -a amd64 -s addon-slug -l /home/xy/my_local_repo
# push to docker hub:
./create_hassio_addon.sh -a amd64 -s addon-slug -l /home/xy/my_local_repo -p
docker run --rm --privileged -v ~/.docker:/root/docker -v /my_addon:/data homeassistant/amd64-builder --all -t /data
```
[builder]: https://github.com/home-assistant/hassio-build/tree/master/build-scripts/addons
[builder]: https://github.com/home-assistant/hassio-build/tree/master/builder