Skip to content

Commit 6e6ad94

Browse files
authored
Integrate dockerbuild (home-assistant#33168)
* Integrate dockerbuild * cleanup
1 parent e344c2e commit 6e6ad94

File tree

6 files changed

+52
-5
lines changed

6 files changed

+52
-5
lines changed

.dockerignore

+6
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@
22
.git
33
.github
44
config
5+
docs
6+
7+
# Development
8+
.devcontainer
9+
.vscode
510

611
# Test related files
712
.tox
13+
tests
814

915
# Other virtualization methods
1016
venv

Dockerfile

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
ARG BUILD_FROM
2+
FROM ${BUILD_FROM}:6.1.0
3+
4+
WORKDIR /usr/src
5+
6+
## Setup Home Assistant
7+
COPY . homeassistant/
8+
RUN pip3 install --no-cache-dir --no-index --only-binary=:all: --find-links "${WHEELS_LINKS}" \
9+
-r homeassistant/requirements_all.txt -c homeassistant/homeassistant/package_constraints.txt \
10+
&& pip3 install --no-cache-dir --no-index --only-binary=:all: --find-links "${WHEELS_LINKS}" \
11+
-e ./homeassistant \
12+
&& python3 -m compileall homeassistant/homeassistant
13+
14+
# Home Assistant S6-Overlay
15+
COPY rootfs /
16+
17+
WORKDIR /config

azure-pipelines-release.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ schedules:
1414
always: true
1515
variables:
1616
- name: versionBuilder
17-
value: '6.9'
17+
value: '7.2.0'
1818
- group: docker
1919
- group: github
2020
- group: twine
@@ -108,11 +108,9 @@ stages:
108108
docker run --rm --privileged \
109109
-v ~/.docker:/root/.docker:rw \
110110
-v /run/docker.sock:/run/docker.sock:rw \
111-
-v $(pwd):/homeassistant:ro \
111+
-v $(pwd):/data:ro \
112112
homeassistant/amd64-builder:$(versionBuilder) \
113-
--homeassistant $(homeassistantRelease) "--$(buildArch)" \
114-
-r https://github.com/home-assistant/hassio-homeassistant \
115-
-t generic --docker-hub homeassistant
113+
--generic $(homeassistantRelease) "--$(buildArch)" -t /data \
116114
117115
docker run --rm --privileged \
118116
-v ~/.docker:/root/.docker \

build.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"image": "homeassistant/{arch}-homeassistant",
3+
"build_from": {
4+
"aarch64": "homeassistant/aarch64-homeassistant-base:7.0.1",
5+
"armhf": "homeassistant/armhf-homeassistant-base:7.0.1",
6+
"armv7": "homeassistant/armv7-homeassistant-base:7.0.1",
7+
"amd64": "homeassistant/amd64-homeassistant-base:7.0.1",
8+
"i386": "homeassistant/i386-homeassistant-base:7.0.1"
9+
},
10+
"labels": {
11+
"io.hass.type": "core"
12+
},
13+
"version_tag": true
14+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/execlineb -S0
2+
# ==============================================================================
3+
# Take down the S6 supervision tree when Home Assistant fails
4+
# ==============================================================================
5+
s6-svscanctl -t /var/run/s6/services
+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/with-contenv bashio
2+
# ==============================================================================
3+
# Start Home Assistant service
4+
# ==============================================================================
5+
cd /config || bashio::exit.nok "Can't find config folder!"
6+
7+
exec python3 -m homeassistant --config /config

0 commit comments

Comments
 (0)