mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-26 02:26:30 +00:00
Own homeassistant docker
This commit is contained in:
parent
1db4eea2e6
commit
ee77c8539e
@ -47,7 +47,6 @@ echo "[INFO] Setup docker for supervisor"
|
|||||||
mkdir -p $BUILD_DIR
|
mkdir -p $BUILD_DIR
|
||||||
mkdir -p $WORKSPACE
|
mkdir -p $WORKSPACE
|
||||||
|
|
||||||
|
|
||||||
cp ../../supervisor/Dockerfile $WORKSPACE/Dockerfile
|
cp ../../supervisor/Dockerfile $WORKSPACE/Dockerfile
|
||||||
sed -i "s/%%BASE_IMAGE%%/${BASE_IMAGE}/g" $WORKSPACE/Dockerfile
|
sed -i "s/%%BASE_IMAGE%%/${BASE_IMAGE}/g" $WORKSPACE/Dockerfile
|
||||||
sed -i "s/%%SUPERVISOR_TAG%%/${DOCKER_TAG}/g" $WORKSPACE/Dockerfile
|
sed -i "s/%%SUPERVISOR_TAG%%/${DOCKER_TAG}/g" $WORKSPACE/Dockerfile
|
||||||
|
@ -42,12 +42,13 @@ WORKSPACE=${BUILD_DIR:=$SCRIPTPATH}/hass
|
|||||||
# setup docker
|
# setup docker
|
||||||
echo "[INFO] Setup docker for homeassistant"
|
echo "[INFO] Setup docker for homeassistant"
|
||||||
mkdir -p $BUILD_DIR
|
mkdir -p $BUILD_DIR
|
||||||
|
mkdir -p $WORKSPACE
|
||||||
|
|
||||||
echo "[INFO] load homeassistant"
|
echo "[INFO] load homeassistant"
|
||||||
cd $BUILD_DIR && git clone https://github.com/home-assistant/home-assistant hass
|
cp ../../homeassistant/Dockerfile $WORKSPACE/Dockerfile
|
||||||
cd hass && git checkout $HASS_VERS
|
|
||||||
|
|
||||||
sed -i "s/FROM.*/${BASE_IMAGE}/g" Dockerfile
|
sed -i "s/%%BASE_IMAGE%%/${BASE_IMAGE}/g" $WORKSPACE/Dockerfile
|
||||||
|
sed -i "s/%%HASS_VERSION%%/${HASS_VERS}/g" $WORKSPACE/Dockerfile
|
||||||
|
|
||||||
# Run build
|
# Run build
|
||||||
echo "[INFO] start docker build"
|
echo "[INFO] start docker build"
|
||||||
|
34
homeassistant/Dockerfile
Normal file
34
homeassistant/Dockerfile
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
FROM %%BASE_IMAGE%%
|
||||||
|
|
||||||
|
# Add version
|
||||||
|
ENV VERSION %%HASS_VERSION%%
|
||||||
|
|
||||||
|
# install core packages
|
||||||
|
RUN apk --no-cache add libuv git linux-headers eudev-dev libusb-dev
|
||||||
|
|
||||||
|
# install component packages
|
||||||
|
RUN apk --no-cache add ffmpeg nmap net-tools
|
||||||
|
|
||||||
|
##
|
||||||
|
# install zwave
|
||||||
|
WORKDIR /usr/src/
|
||||||
|
RUN pip3 install --no-cache-dir cython==0.25.2
|
||||||
|
|
||||||
|
WORKDIR /usr/src/python-openzwave/
|
||||||
|
RUN git clone https://github.com/OpenZWave/python-openzwave \
|
||||||
|
&& cd python-openzwave
|
||||||
|
&& git checkout v0.3.2 \
|
||||||
|
&& make build \
|
||||||
|
&& make install \
|
||||||
|
&& mkdir -p /usr/local/share/python-openzwave
|
||||||
|
&& cp -R openzwave/config /usr/local/share/python-openzwave/config
|
||||||
|
&& rm -rf /usr/src/python-openzwave
|
||||||
|
|
||||||
|
##
|
||||||
|
# install pip module for components
|
||||||
|
|
||||||
|
# install home-assistant
|
||||||
|
RUN pip3 install --no-cache-dir uvloop homeassistant==%%HASS_VERSION%%
|
||||||
|
|
||||||
|
# Run hass
|
||||||
|
CMD [ "python", "-m", "homeassistant", "--config", "/config" ]
|
Loading…
x
Reference in New Issue
Block a user