Skip to content
Permalink
Browse files
Integrate dockerbuild (#33168)
* Integrate dockerbuild

* cleanup
  • Loading branch information
pvizeli committed Mar 22, 2020
1 parent e344c2e commit 6e6ad94df61dfdb3043d4ab98398ca132c315a2e
Showing 6 changed files with 52 additions and 5 deletions.
@@ -2,9 +2,15 @@
.git
.github
config
docs

# Development
.devcontainer
.vscode

# Test related files
.tox
tests

# Other virtualization methods
venv
@@ -0,0 +1,17 @@
ARG BUILD_FROM
FROM ${BUILD_FROM}:6.1.0

WORKDIR /usr/src

## Setup Home Assistant
COPY . homeassistant/
RUN pip3 install --no-cache-dir --no-index --only-binary=:all: --find-links "${WHEELS_LINKS}" \
-r homeassistant/requirements_all.txt -c homeassistant/homeassistant/package_constraints.txt \
&& pip3 install --no-cache-dir --no-index --only-binary=:all: --find-links "${WHEELS_LINKS}" \
-e ./homeassistant \
&& python3 -m compileall homeassistant/homeassistant

# Home Assistant S6-Overlay
COPY rootfs /

WORKDIR /config
@@ -14,7 +14,7 @@ schedules:
always: true
variables:
- name: versionBuilder
value: '6.9'
value: '7.2.0'
- group: docker
- group: github
- group: twine
@@ -108,11 +108,9 @@ stages:
docker run --rm --privileged \
-v ~/.docker:/root/.docker:rw \
-v /run/docker.sock:/run/docker.sock:rw \
-v $(pwd):/homeassistant:ro \
-v $(pwd):/data:ro \
homeassistant/amd64-builder:$(versionBuilder) \
--homeassistant $(homeassistantRelease) "--$(buildArch)" \
-r https://github.com/home-assistant/hassio-homeassistant \
-t generic --docker-hub homeassistant
--generic $(homeassistantRelease) "--$(buildArch)" -t /data \
docker run --rm --privileged \
-v ~/.docker:/root/.docker \
@@ -0,0 +1,14 @@
{
"image": "homeassistant/{arch}-homeassistant",
"build_from": {
"aarch64": "homeassistant/aarch64-homeassistant-base:7.0.1",
"armhf": "homeassistant/armhf-homeassistant-base:7.0.1",
"armv7": "homeassistant/armv7-homeassistant-base:7.0.1",
"amd64": "homeassistant/amd64-homeassistant-base:7.0.1",
"i386": "homeassistant/i386-homeassistant-base:7.0.1"
},
"labels": {
"io.hass.type": "core"
},
"version_tag": true
}
@@ -0,0 +1,5 @@
#!/usr/bin/execlineb -S0
# ==============================================================================
# Take down the S6 supervision tree when Home Assistant fails
# ==============================================================================
s6-svscanctl -t /var/run/s6/services
@@ -0,0 +1,7 @@
#!/usr/bin/with-contenv bashio
# ==============================================================================
# Start Home Assistant service
# ==============================================================================
cd /config || bashio::exit.nok "Can't find config folder!"

exec python3 -m homeassistant --config /config

0 comments on commit 6e6ad94

Please sign in to comment.