File tree 11 files changed +17
-95
lines changed
11 files changed +17
-95
lines changed Original file line number Diff line number Diff line change 1
- ARG BUILD_FROM BUILD_FROM_TAG
2
- FROM python:3.12-slim
1
+ FROM homeassistant/home-assistant:dev
3
2
4
3
ENV DEVCONTAINER=true
5
4
6
5
COPY ./container /container
7
6
COPY ./install /install
8
7
9
- ARG OS_VARIANT CONTAINER_TYPE
10
8
RUN \
11
9
bash /install/init.sh \
12
10
&& bash /install/container.sh \
13
- && bash /install/integration.sh \
14
11
&& bash /install/cleanup.sh
15
12
16
13
CMD ["bash" ]
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
# shellcheck source=/dev/null
3
3
4
- source /opt/container/helpers/common/ paths.sh
4
+ source /opt/container/helpers/paths.sh
5
5
mkdir -p /config
6
6
7
7
if test -f " $( workspacePath) config/configuration.yaml" ; then
22
22
if test -d " $( workspacePath) custom_components" ; then
23
23
echo " Symlink the custom component directory"
24
24
25
- if test -d " $( workspacePath ) custom_components" ; then
25
+ if test -d " /config/ custom_components" ; then
26
26
rm -R /config/custom_components
27
27
fi
28
28
29
29
ln -sf " $( workspacePath) custom_components/" /config/custom_components || echo " Could not copy the custom_component" exit 1
30
- elif test -f " __init__.py" ; then
30
+ elif test -f " __init__.py" ; then
31
31
echo " Having the component in the root is currently not supported"
32
32
fi
33
33
Load Diff This file was deleted.
File renamed without changes.
Original file line number Diff line number Diff line change 1
1
start : # # Start Home Assistant with the integration loaded
2
- @bash /opt/container/helpers/common/homeassistant/start.sh
2
+ @bash /opt/container/helpers/homeassistant/start.sh
3
+
4
+ run :
5
+ start
6
+
7
+ up :
8
+ start
3
9
4
10
set-version : # # Set Home Assistant version
5
- @bash /opt/container/helpers/common/ homeassistant/set-version.sh
11
+ @bash /opt/container/helpers/homeassistant/set-version.sh
6
12
7
13
install : # # Install Home Assistant dev in the container
8
14
@python3 -m pip --disable-pip-version-check install --upgrade git+https://github.com/home-assistant/home-assistant.git@dev
9
15
10
16
upgrade : # # Upgrade Home Assistant to latest dev in the container
11
17
install
12
18
13
- run :
14
- start
15
-
16
19
check-config : # # Check Home Assistant config
17
20
@hass -c /config --script check_config
18
-
19
- init : # # Initialize the dev env
20
- @bash /opt/container/helpers/integration/init.sh
Original file line number Diff line number Diff line change 2
2
3
3
echo -e " \\ 033[0;34mRunning cleanup script 'cleanup.sh'\\ 033[0m"
4
4
5
- apt-get clean -y
6
5
rm -fr /var/lib/apt/lists/*
7
6
rm -fr /tmp/* /var/{cache,log}/*
8
7
Original file line number Diff line number Diff line change @@ -4,21 +4,19 @@ echo -e "\\033[0;34mRunning install script 'container.sh'\\033[0m"
4
4
5
5
export DEBIAN_FRONTEND=noninteractive
6
6
7
- apt-get update
8
- apt-get install -y --no-install-recommends \
9
- make
7
+ apk add --no-cache \
8
+ make \
9
+ git
10
10
11
11
mkdir -p /opt/container/makefiles
12
12
mkdir -p /opt/container/helpers
13
- touch /opt/container/makefiles/dummy.mk
14
13
15
14
cp /container/container.mk /opt/container/container.mk
16
- cp -r /container/helpers/common /opt/container/helpers/common
15
+ cp -r /container/helpers /opt/container/helpers
17
16
18
17
cp /container/container /usr/bin/container
19
18
chmod +x /usr/bin/container
20
19
21
20
cp /container/makefiles/integration.mk /opt/container/makefiles/integration.mk
22
- cp -r /container/helpers/integration /opt/container/helpers/integration
23
21
24
22
container help
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -84,10 +84,6 @@ if ! ${docker} ps -a | grep -wq ${container} && [[ "${cmd}" != "down" ]]; then
84
84
${docker} create -it --name " ${container} " -p " ${port} " -v " ${volume} " " ${image} "
85
85
86
86
docker_start
87
-
88
- log.info " Initialize container..."
89
- ${docker} exec -it -w " ${workdir} " " ${container} " container install
90
- bootstrap " install"
91
87
fi
92
88
93
89
if [[ " ${cmd} " == " menu" ]]; then
@@ -143,7 +139,7 @@ case "${cmd}" in
143
139
docker_start
144
140
fi
145
141
log.info " Send command '${cmd} ' to container..."
146
- if [[ " ${cmd} " == " start" ]]; then
142
+ if [[ " ${cmd} " == " start" || " ${cmd} " == " up " || " ${cmd} " == " run " ]]; then
147
143
log.info " Note: After Home Assistant initialization you can access to system on http://localhost:9123/"
148
144
fi
149
145
${docker} exec -it -w " ${workdir} " " ${container} " container " ${cmd} "
You can’t perform that action at this time.
0 commit comments