🎉 Initial code

This commit is contained in:
Franck Nijhof 2017-09-15 23:41:19 +02:00
parent 92a5f64fd1
commit 783f463d9c
No known key found for this signature in database
GPG key ID: D62583BA8AB11CA3
23 changed files with 625 additions and 0 deletions

19
.editorconfig Executable file
View file

@ -0,0 +1,19 @@
root = true
[*]
charset = utf-8
end_of_line = lf
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
ident_size = 4
[*.md]
ident_size = 2
trim_trailing_whitespace = false
[*.json]
ident_size = 2
[{.gitignore,.gitkeep,.editorconfig}]
ident_size = 2

19
.github/ISSUE_TEMPLATE.md vendored Executable file
View file

@ -0,0 +1,19 @@
## Problem/Motivation
> (Why the issue was filed)
## Expected behavior
> (What you expected to happen)
## Actual behavior
> (What actually happened)
## Steps to reproduce
> (How can someone else make/see it happen)
## Proposed changes
> (If you have a proposed change, workaround or fix, describe the rationale behind it)

7
.github/PULL_REQUEST_TEMPLATE.md vendored Executable file
View file

@ -0,0 +1,7 @@
## Proposed Changes
> (Describe the changes and rationale behind them)
## Related Issues
> ([Github link](https://help.github.com/articles/autolinked-references-and-urls/) to related issues or pull requests)

0
.gitignore vendored Normal file
View file

71
CODE_OF_CONDUCT.md Normal file
View file

@ -0,0 +1,71 @@
# Code of conduct
## Our pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.
## Our standards
Examples of behavior that contributes to creating a positive environment
include:
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting
## Our responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project lead at frenck@geekchimp.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project lead is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/

29
CONTRIBUTING.md Normal file
View file

@ -0,0 +1,29 @@
# Contributing
When contributing to this repository, please first discuss the change you wish
to make via issue, email, or any other method with the owners of this repository
before making a change.
Please note we have a code of conduct, please follow it in all your interactions
with the project.
## Issues and feature requests
You've found a bug in the source code, a mistake in the documentation or maybe
you'd like a new feature? You can help us by submitting an issue to our
[GitHub Repository][github]. Before you create an issue, make sure you search
the archive, maybe your question was already answered.
Even better: You could submit a pull request with a fix / new feature!
## Pull request process
1. Search our repository for open or closed [pull requests][prs] that relates
to your submission. You don't want to duplicate effort.
2. You may merge the pull request in once you have the sign-off of two other
developers, or if you do not have permission to do that, you may request
the second reviewer to merge it for you.
[github]: https://github.com/hassio-addons/addon-base/issues
[prs]: https://github.com/hassio-addons/addon-base/pulls

21
LICENSE.md Normal file
View file

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2017 Franck Nijhof
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

150
README.md Normal file
View file

@ -0,0 +1,150 @@
# Community Hass.io Add-ons: Base Images
![Project Stage][project-stage-shield]
![Maintenance][maintenance-shield]
![Awesome][awesome-shield]
[![License][license-shield]](LICENSE.md)
Docker base images used by Community Hass.io add-ons.
## Docker status
[![Docker Architecture][armhf-arch-shield]][armhf-dockerhub]
[![Docker Version][armhf-version-shield]][armhf-microbadger]
[![Docker Layers][armhf-layers-shield]][armhf-microbadger]
[![Docker Pulls][armhf-pulls-shield]][armhf-dockerhub]
[![Docker Architecture][aarch64-arch-shield]][aarch64-dockerhub]
[![Docker Version][aarch64-version-shield]][aarch64-microbadger]
[![Docker Layers][aarch64-layers-shield]][aarch64-microbadger]
[![Docker Pulls][aarch64-pulls-shield]][aarch64-dockerhub]
[![Docker Architecture][amd64-arch-shield]][amd64-dockerhub]
[![Docker Version][amd64-version-shield]][amd64-microbadger]
[![Docker Layers][amd64-layers-shield]][amd64-microbadger]
[![Docker Pulls][amd64-pulls-shield]][amd64-dockerhub]
[![Docker Architecture][i386-arch-shield]][i386-dockerhub]
[![Docker Version][i386-version-shield]][i386-microbadger]
[![Docker Layers][i386-layers-shield]][i386-microbadger]
[![Docker Pulls][i386-pulls-shield]][i386-dockerhub]
## About
These are the base images used by add-ons created by the Community Hass.io
Add-ons.
While Home Assistant provides base images, the images provided by this
repository contain some extra's:
- Adds [s6] as a process supervisor.
- Adds `jq`.
- Adds Docker [Label Schema][label-schema] support.
- Several small adjustments and improvements.
## Changelog
This repository keeps a [change log](CHANGELOG.md) and adhere to
[Semantic Versioning][semver].
The format of the log is based on [Keep a Changelog][keepchangelog]
## Support
Got questions?
You have several options to get them answered:
- The Home Assistant [Community Forums][forums], we have a
[dedicated topic][forums] on that forum regarding this repository.
- The Home Assistant [Discord Chat Server][discord] for general Home Assistant
discussions and questions.
- Join the [Reddit subreddit][reddit] in [/r/homeassistant][reddit]
You could also [open an issue here][issue] GitHub.
## Contributing
This is an active open-source project. We are always open to people who want to
use the code or contribute to it.
We've set up a separate document for our [contribution guidelines](CONTRIBUTING.md).
Thank you for being involved! :heart_eyes:
## Authors & contributors
The original setup of this repository is by [Franck Nijhof][frenck].
For a full list of all authors and contributors,
check [the contributor's page][contributors].
## Looking for Hass.io add-ons?
Want some more functionality to your Hass.io Home Assistant instance?
We have created multiple add-ons for Hass.io. For a full list, check out
our [GitHub Repository][repository].
## License
MIT License
Copyright (c) 2017 Franck Nijhof
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
[aarch64-arch-shield]: https://img.shields.io/badge/architecture-aarch64-blue.svg
[aarch64-dockerhub]: https://hub.docker.com/r/hassioaddons/base-aarch64
[aarch64-layers-shield]: https://images.microbadger.com/badges/image/hassioaddons/base-aarch64.svg
[aarch64-microbadger]: https://microbadger.com/images/hassioaddons/base-aarch64
[aarch64-pulls-shield]: https://img.shields.io/docker/pulls/hassioaddons/base-aarch64.svg
[aarch64-version-shield]: https://images.microbadger.com/badges/version/hassioaddons/base-aarch64.svg
[amd64-arch-shield]: https://img.shields.io/badge/architecture-amd64-blue.svg
[amd64-dockerhub]: https://hub.docker.com/r/hassioaddons/base-amd64
[amd64-layers-shield]: https://images.microbadger.com/badges/image/hassioaddons/base-amd64.svg
[amd64-microbadger]: https://microbadger.com/images/hassioaddons/base-amd64
[amd64-pulls-shield]: https://img.shields.io/docker/pulls/hassioaddons/base-amd64.svg
[amd64-version-shield]: https://images.microbadger.com/badges/version/hassioaddons/base-amd64.svg
[armhf-arch-shield]: https://img.shields.io/badge/architecture-armhf-blue.svg
[armhf-dockerhub]: https://hub.docker.com/r/hassioaddons/base-armhf
[armhf-layers-shield]: https://images.microbadger.com/badges/image/hassioaddons/base-armhf.svg
[armhf-microbadger]: https://microbadger.com/images/hassioaddons/base-armhf
[armhf-pulls-shield]: https://img.shields.io/docker/pulls/hassioaddons/base-armhf.svg
[armhf-version-shield]: https://images.microbadger.com/badges/version/hassioaddons/base-armhf.svg
[awesome-shield]: https://img.shields.io/badge/awesome%3F-yes-brightgreen.svg
[i386-arch-shield]: https://img.shields.io/badge/architecture-i386-blue.svg
[i386-dockerhub]: https://hub.docker.com/r/hassioaddons/base-i386
[i386-layers-shield]: https://images.microbadger.com/badges/image/hassioaddons/base-i386.svg
[i386-microbadger]: https://microbadger.com/images/hassioaddons/base-i386
[i386-pulls-shield]: https://img.shields.io/docker/pulls/hassioaddons/base-i386.svg
[i386-version-shield]: https://images.microbadger.com/badges/version/hassioaddons/base-i386.svg
[license-shield]: https://img.shields.io/github/license/hassio-addons/addon-base.svg
[maintenance-shield]: https://img.shields.io/maintenance/yes/2017.svg
[project-stage-shield]: https://img.shields.io/badge/Project%20Stage-Experimental-yellow.svg
[repository]: https://github.com/hassio-addons/repository
[frenck]: https://github.com/frenck
[contributors]: https://github.com/hassio-addons/build-env/graphs/contributors
[issue]: https://github.com/hassio-addons/build-env/issues
[discord]: https://discord.gg/c5DvZ4e
[forums]: https://community.home-assistant.io/t/repository-community-hass-io-add-ons/24705?u=frenck
[reddit]: https://reddit.com/r/homeassistant
[semver]: http://semver.org/spec/v2.0.0.html
[keepchangelog]: http://keepachangelog.com/en/1.0.0/
[s6]: http://skarnet.org/software/s6/overview.html
[label-schema]: http://label-schema.org/

66
aarch64/Dockerfile Normal file
View file

@ -0,0 +1,66 @@
FROM arm64v8/alpine:3.6
# Internal arguments
ARG S6_OVERLAY_VERSION="v1.20.0.0"
# Environment variables
ENV \
HOME="/root" \
LANG="C.UTF-8" \
PS1="$(whoami)@$(hostname):$(pwd)$ " \
TERM="xterm"
# Entrypoint & CMD
ENTRYPOINT [ "/init" ]
# Install base system
RUN \
# Install build dependencies
apk add --no-cache --virtual .build-dependencies \
curl \
tar \
\
&& apk add --no-cache \
ca-certificates \
eudev \
jq \
tzdata \
\
&& curl -L -s \
"https://github.com/just-containers/s6-overlay/releases/download/${S6_OVERLAY_VERSION}/s6-overlay-aarch64.tar.gz" \
| tar zxvf - -C / \
\
&& apk del --purge .build-dependencies \
\
&& mkdir -p \
/etc/cont-finish.d \
/etc/cont-init.d \
/etc/fix-attrs.d \
/etc/services.d \
\
&& rm -f -r \
/tmp/*
# Copy root filesystem
COPY rootfs /
# Build arugments
ARG BUILD_DATE
ARG BUILD_REF
ARG BUILD_VERSION
# Labels
LABEL \
io.hass.arch="aarch64" \
io.hass.type="addon" \
io.hass.version=${BUILD_VERSION} \
maintainer="Franck Nijhof <frenck@addons.community>" \
org.label-schema.description="Community Hass.io Add-ons: aarch64 Base image" \
org.label-schema.build-date=${BUILD_DATE} \
org.label-schema.name="Addon base for aarch64" \
org.label-schema.schema-version="1.0" \
org.label-schema.url="http://addons.community" \
org.label-schema.usage="https://github.com/hassio-addons/addon-base/blob/master/README.md" \
org.label-schema.vcs-ref=${BUILD_REF} \
org.label-schema.vcs-url="https://github.com/hassio-addons/addon-base" \
org.label-schema.vendor="Franck Nijhof"

4
aarch64/hassio.json Normal file
View file

@ -0,0 +1,4 @@
{
"arch": ["aarch64"],
"image": "hassioaddons/base-aarch64"
}

View file

@ -0,0 +1,7 @@
#!/usr/bin/execlineb -P
with-contenv
background -d {
s6-sleep 3
udevadm trigger
}
udevd

Binary file not shown.

66
amd64/Dockerfile Normal file
View file

@ -0,0 +1,66 @@
FROM alpine:3.6
# Internal arguments
ARG S6_OVERLAY_VERSION="v1.20.0.0"
# Environment variables
ENV \
HOME="/root" \
LANG="C.UTF-8" \
PS1="$(whoami)@$(hostname):$(pwd)$ " \
TERM="xterm"
# Entrypoint & CMD
ENTRYPOINT [ "/init" ]
# Install base system
RUN \
# Install build dependencies
apk add --no-cache --virtual .build-dependencies \
curl \
tar \
\
&& apk add --no-cache \
ca-certificates \
eudev \
jq \
tzdata \
\
&& curl -L -s \
"https://github.com/just-containers/s6-overlay/releases/download/${S6_OVERLAY_VERSION}/s6-overlay-amd64.tar.gz" \
| tar zxvf - -C / \
\
&& apk del --purge .build-dependencies \
\
&& mkdir -p \
/etc/cont-finish.d \
/etc/cont-init.d \
/etc/fix-attrs.d \
/etc/services.d \
\
&& rm -f -r \
/tmp/*
# Copy root filesystem
COPY rootfs /
# Build arugments
ARG BUILD_DATE
ARG BUILD_REF
ARG BUILD_VERSION
# Labels
LABEL \
io.hass.arch="amd64" \
io.hass.type="addon" \
io.hass.version=${BUILD_VERSION} \
maintainer="Franck Nijhof <frenck@addons.community>" \
org.label-schema.description="Community Hass.io Add-ons: amd64 Base image" \
org.label-schema.build-date=${BUILD_DATE} \
org.label-schema.name="Addon base for amd64" \
org.label-schema.schema-version="1.0" \
org.label-schema.url="http://addons.community" \
org.label-schema.usage="https://github.com/hassio-addons/addon-base/blob/master/README.md" \
org.label-schema.vcs-ref=${REF} \
org.label-schema.vcs-url="https://github.com/hassio-addons/addon-base" \
org.label-schema.vendor="Franck Nijhof"

4
amd64/hassio.json Normal file
View file

@ -0,0 +1,4 @@
{
"arch": ["amd64"],
"image": "hassioaddons/base-amd64"
}

View file

@ -0,0 +1,7 @@
#!/usr/bin/execlineb -P
with-contenv
background -d {
s6-sleep 3
udevadm trigger
}
udevd

66
armhf/Dockerfile Normal file
View file

@ -0,0 +1,66 @@
FROM arm32v6/alpine:3.6
# Internal arguments
ARG S6_OVERLAY_VERSION="v1.20.0.0"
# Environment variables
ENV \
HOME="/root" \
LANG="C.UTF-8" \
PS1="$(whoami)@$(hostname):$(pwd)$ " \
TERM="xterm"
# Entrypoint & CMD
ENTRYPOINT [ "/init" ]
# Install base system
RUN \
# Install build dependencies
apk add --no-cache --virtual .build-dependencies \
curl \
tar \
\
&& apk add --no-cache \
ca-certificates \
eudev \
jq \
tzdata \
\
&& curl -L -s \
"https://github.com/just-containers/s6-overlay/releases/download/${S6_OVERLAY_VERSION}/s6-overlay-armhf.tar.gz" \
| tar zxvf - -C / \
\
&& apk del --purge .build-dependencies \
\
&& mkdir -p \
/etc/cont-finish.d \
/etc/cont-init.d \
/etc/fix-attrs.d \
/etc/services.d \
\
&& rm -f -r \
/tmp/*
# Copy root filesystem
COPY rootfs /
# Build arugments
ARG BUILD_DATE
ARG BUILD_REF
ARG BUILD_VERSION
# Labels
LABEL \
io.hass.arch="armhf" \
io.hass.type="addon" \
io.hass.version=${BUILD_VERSION} \
maintainer="Franck Nijhof <frenck@addons.community>" \
org.label-schema.description="Community Hass.io Add-ons: armhf Base image" \
org.label-schema.build-date=${BUILD_DATE} \
org.label-schema.name="Addon base for armhf" \
org.label-schema.schema-version="1.0" \
org.label-schema.url="http://addons.community" \
org.label-schema.usage="https://github.com/hassio-addons/addon-base/blob/master/README.md" \
org.label-schema.vcs-ref=${REF} \
org.label-schema.vcs-url="https://github.com/hassio-addons/addon-base" \
org.label-schema.vendor="Franck Nijhof"

1
armhf/build.sh Symbolic link
View file

@ -0,0 +1 @@
/root/build.sh

4
armhf/hassio.json Normal file
View file

@ -0,0 +1,4 @@
{
"arch": ["armhf"],
"image": "hassioaddons/base-armhf"
}

View file

@ -0,0 +1,7 @@
#!/usr/bin/execlineb -P
with-contenv
background -d {
s6-sleep 3
udevadm trigger
}
udevd

Binary file not shown.

66
i386/Dockerfile Normal file
View file

@ -0,0 +1,66 @@
FROM i386/alpine:3.6
# Internal arguments
ARG S6_OVERLAY_VERSION="v1.20.0.0"
# Environment variables
ENV \
HOME="/root" \
LANG="C.UTF-8" \
PS1="$(whoami)@$(hostname):$(pwd)$ " \
TERM="xterm"
# Entrypoint & CMD
ENTRYPOINT [ "/init" ]
# Install base system
RUN \
# Install build dependencies
apk add --no-cache --virtual .build-dependencies \
curl \
tar \
\
&& apk add --no-cache \
ca-certificates \
eudev \
jq \
tzdata \
\
&& curl -L -s \
"https://github.com/just-containers/s6-overlay/releases/download/${S6_OVERLAY_VERSION}/s6-overlay-x86.tar.gz" \
| tar zxvf - -C / \
\
&& apk del --purge .build-dependencies \
\
&& mkdir -p \
/etc/cont-finish.d \
/etc/cont-init.d \
/etc/fix-attrs.d \
/etc/services.d \
\
&& rm -f -r \
/tmp/*
# Copy root filesystem
COPY rootfs /
# Build arugments
ARG BUILD_DATE
ARG BUILD_REF
ARG BUILD_VERSION
# Labels
LABEL \
io.hass.arch="i386" \
io.hass.type="addon" \
io.hass.version=${BUILD_VERSION} \
maintainer="Franck Nijhof <frenck@addons.community>" \
org.label-schema.description="Community Hass.io Add-ons: i386 Base image" \
org.label-schema.build-date=${BUILD_DATE} \
org.label-schema.name="Addon base for i386" \
org.label-schema.schema-version="1.0" \
org.label-schema.url="http://addons.community" \
org.label-schema.usage="https://github.com/hassio-addons/addon-base/blob/master/README.md" \
org.label-schema.vcs-ref=${BUILD_REF} \
org.label-schema.vcs-url="https://github.com/hassio-addons/addon-base" \
org.label-schema.vendor="Franck Nijhof"

4
i386/hassio.json Normal file
View file

@ -0,0 +1,4 @@
{
"arch": ["i386"],
"image": "hassioaddons/base-i386"
}

View file

@ -0,0 +1,7 @@
#!/usr/bin/execlineb -P
with-contenv
background -d {
s6-sleep 3
udevadm trigger
}
udevd