79 lines
1.8 KiB
Docker
79 lines
1.8 KiB
Docker
FROM python:3.11 as base
|
|
MAINTAINER ben <ben@sudo.is>
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
ENV TZ=UTC
|
|
ENV TERM=xterm-256color
|
|
ARG UID=400
|
|
|
|
# https://www.home-assistant.io/installation/linux#install-home-assistant-core
|
|
COPY deb/deps.txt /tmp/deps.txt
|
|
RUN set -xe && \
|
|
useradd -u ${UID} -d /srv/hass -rm hass && \
|
|
apt-get update && \
|
|
xargs -a /tmp/deps.txt apt-get -y install && \
|
|
apt-get clean && \
|
|
rm -v /tmp/deps.txt
|
|
|
|
RUN set -x && \
|
|
apt-get install -y jq
|
|
|
|
USER hass
|
|
WORKDIR /srv/hass
|
|
|
|
#FROM base as builder
|
|
#RUN set -x \i
|
|
# mkdir /srv/hass/venv && \
|
|
# python3 -m venv /srv/hass/venv/hass && \
|
|
# ls -l /srv/hass && \
|
|
# pip install wheel && \
|
|
# mkdir homeassistant
|
|
|
|
#ENV PATH=/srv/hass/venv/hass/bin:${PATH}
|
|
#RUN set -x && \
|
|
# which python3 && which pip && \
|
|
# date
|
|
|
|
FROM base as venvbuilder
|
|
ARG HASS_VERSION
|
|
ENV PATH=/srv/hass/venv/hass/bin:${PATH}
|
|
COPY hass-install.sh /usr/local/bin/
|
|
COPY .pipeline/version.sh /usr/local/bin/
|
|
RUN set -x && \
|
|
python3 -m venv /srv/hass/venv/hass && \
|
|
which python python3 pip pip3 && \
|
|
pip install wheel && \
|
|
/usr/local/bin/hass-install.sh && \
|
|
which hass && \
|
|
hass --version
|
|
|
|
ENTRYPOINT /bin/bash
|
|
## -----
|
|
#RUN set -x && \
|
|
# python3 -m venv /srv/hass/venv/hass
|
|
#
|
|
#RUN set -x && \
|
|
# which python3 && which pip && \
|
|
# pip install wheel && \
|
|
# /usr/local/bin/pip-install-homeassistant.sh && \
|
|
# which hass
|
|
#
|
|
#RUN set -x && \
|
|
# hass --version && \
|
|
# hass --help
|
|
|
|
#FROM base as packager
|
|
#FROM fpm:minimal as packager
|
|
#RUN set -x && \
|
|
# apt-get install -y ruby ruby-dev rubygems && \
|
|
# gem install fpm && \
|
|
# fpm --version
|
|
#
|
|
#COPY --from=builder /srv/hass/venv/hass /usr/local/src/hass/venv
|
|
#COPY deb/ /usr/local/src/hass/deb
|
|
#
|
|
#RUN set -x && \
|
|
# /usr/local/src/hass/deb/package.sh
|
|
|
|
|