Fix dep versions
This commit is contained in:
26
Dockerfile
26
Dockerfile
@@ -1,12 +1,20 @@
|
||||
FROM homeassistant/home-assistant:2021.3.3
|
||||
FROM homeassistant/home-assistant:2021.3.4
|
||||
|
||||
COPY src/ /usr/src/homeassistant/homeassistant/
|
||||
|
||||
RUN /usr/local/bin/python3 -m pip install --quiet --no-cache-dir --upgrade --constraint /usr/src/homeassistant/homeassistant/package_constraints.txt --find-links https://wheels.home-assistant.io/alpine-3.10/amd64/ --prefer-binary \
|
||||
aiofiles \
|
||||
aiogithubapi \
|
||||
backoff \
|
||||
hacs_frontend \
|
||||
integrationhelper \
|
||||
semantic_version \
|
||||
queueman
|
||||
RUN mkdir -p /usr/local/config/custom_components && \
|
||||
touch /usr/local/config/home-assistant.log && \
|
||||
cd /usr/local/config && \
|
||||
wget -q -O - https://install.hacs.xyz | bash - && \
|
||||
cat /usr/local/config/custom_components/hacs/manifest.json | jq -r .requirements[] | xargs /usr/local/bin/python3 -m pip install --quiet --no-cache-dir --upgrade --constraint /usr/src/homeassistant/homeassistant/package_constraints.txt --find-links https://wheels.home-assistant.io/alpine-3.10/amd64/ --prefer-binary
|
||||
|
||||
RUN cd /tmp && \
|
||||
wget https://github.com/zacs/ha-dualmodegeneric/archive/refs/heads/master.zip && \
|
||||
unzip master.zip && \
|
||||
mv ha-dualmodegeneric-master/custom_components/* /usr/local/config/custom_components/ && \
|
||||
rm -rf /tmp/*
|
||||
|
||||
ADD entrypoint.sh /entrypoint.sh
|
||||
|
||||
ENV PYTHONUSERBASE /config/deps
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
FROM homeassistant/home-assistant:2021.3.3
|
||||
FROM homeassistant/home-assistant:2021.3.4
|
||||
|
||||
COPY src/ /usr/src/homeassistant/homeassistant/
|
||||
|
||||
RUN /usr/local/bin/python3 -m pip install --quiet --no-cache-dir --upgrade --constraint /usr/src/homeassistant/homeassistant/package_constraints.txt --find-links https://wheels.home-assistant.io/alpine-3.10/aarch64/ --prefer-binary \
|
||||
aiofiles \
|
||||
aiogithubapi \
|
||||
backoff \
|
||||
hacs_frontend \
|
||||
integrationhelper \
|
||||
semantic_version \
|
||||
queueman
|
||||
RUN mkdir -p /usr/local/config/custom_components && \
|
||||
touch /usr/local/config/home-assistant.log && \
|
||||
cd /usr/local/config && \
|
||||
wget -q -O - https://install.hacs.xyz | bash - && \
|
||||
cat /usr/local/config/custom_components/hacs/manifest.json | jq -r .requirements[] | xargs /usr/local/bin/python3 -m pip install --quiet --no-cache-dir --upgrade --constraint /usr/src/homeassistant/homeassistant/package_constraints.txt --find-links https://wheels.home-assistant.io/alpine-3.10/amd64/ --prefer-binary
|
||||
|
||||
ADD entrypoint.sh /entrypoint.sh
|
||||
|
||||
ENV PYTHONUSERBASE /config/deps
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
15
entrypoint.sh
Executable file
15
entrypoint.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
[ ! -f /config/custom_components ] || rm -f /config/custom_components
|
||||
[ -d /config/custom_components ] || mkdir -p /config/custom_components
|
||||
|
||||
for component in /usr/local/config/custom_components/*; do
|
||||
cb="$(basename "${component}")"
|
||||
[ ! -d "/config/custom_components/${cb}" ] || rm -rf "/config/custom_components/${cb}"
|
||||
if [ ! -e "/config/custom_components/${cb}" ]; then
|
||||
echo "Installing custom component ${cb}"
|
||||
ln -s "${component}" "/config/custom_components/${cb}"
|
||||
fi
|
||||
done
|
||||
|
||||
exec /init "$@"
|
||||
Reference in New Issue
Block a user