Skip to content

Commit

Permalink
fix: updates to hass container build
Browse files Browse the repository at this point in the history
Signed-off-by: Devin Buhl <devin@buhl.casa>
  • Loading branch information
onedr0p committed Apr 7, 2024
1 parent 0142e8d commit 010370f
Showing 1 changed file with 13 additions and 29 deletions.
42 changes: 13 additions & 29 deletions apps/home-assistant/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
ARG VERSION
FROM docker.io/library/alpine:3.19 as builder
FROM docker.io/library/golang:1.22-alpine as builder
ARG VERSION
ARG TARGETOS
ARG TARGETARCH
ARG TARGETVARIANT=""
ARG TARGETPLATFORM
ENV GO111MODULE=on \
CGO_ENABLED=0 \
ENV CGO_ENABLED=0 \
GOOS=${TARGETOS} \
GOARCH=${TARGETARCH} \
GOARM=${TARGETVARIANT} \
GOPATH=/go
ENV PATH $GOPATH/bin:$PATH
GOARM=${TARGETVARIANT}
#hadolint ignore=DL3018
RUN \
apk add --no-cache go upx \
apk add --no-cache upx \
&& go install -ldflags="-s -w" github.com/drone/envsubst/cmd/envsubst@latest \
&& upx /go/bin/envsubst

FROM docker.io/library/python:3.12.2-alpine3.19
FROM docker.io/library/python:3.12-alpine

ARG TARGETPLATFORM
ARG VERSION
Expand All @@ -40,16 +37,14 @@ ENV UMASK="0002" \

WORKDIR /tmp

#hadolint ignore=DL3018
#hadolint ignore=DL3018,DL3013,DL3059,DL4006
RUN \
apk add --no-cache \
ca-certificates catatonit bash \
bind-tools coreutils curl iputils jo \
jq moreutils nano pv tzdata unzip \
util-linux wget

#hadolint ignore=DL3018
RUN \
util-linux wget \
&& \
apk add --no-cache \
bluez \
bluez-deprecated \
Expand All @@ -68,13 +63,9 @@ RUN \
openssh-client \
openssl \
postgresql-libs \
py3-pip \
python3 \
socat \
tiff

#hadolint ignore=DL3018,DL3013,DL3059,DL4006
RUN \
tiff \
&& \
apk add --no-cache --virtual=.build-deps \
autoconf \
build-base \
Expand All @@ -89,16 +80,9 @@ RUN \
libxml2-dev \
libxslt-dev \
postgresql-dev \
python3-dev \
unixodbc-dev \
&& \
pip install --upgrade pip uv \
&& \
uv pip install --system --upgrade \
cython \
pyparsing \
setuptools \
wheel \
pip install uv \
&& \
curl -fsSL "https://github.com/home-assistant/core/archive/${VERSION}.tar.gz" \
| tar xzf - -C /tmp --strip-components=1 \
Expand All @@ -114,10 +98,10 @@ RUN \
&& \
HOME_ASSISTANT_BASE=$(curl -fsSL "https://raw.githubusercontent.com/home-assistant/core/${VERSION}/build.yaml" | grep "${ARCH}: " | cut -d ":" -f3) \
&& \
uv pip install --system --no-index --only-binary=:all: --find-links "${HOMEASSISTANT_WHEELS}" \
uv pip install --system --only-binary=:all: --find-links "${HOMEASSISTANT_WHEELS}" \
--requirement "https://raw.githubusercontent.com/home-assistant/docker/${HOME_ASSISTANT_BASE}/requirements.txt" \
&& \
uv pip install --system --find-links "${HOMEASSISTANT_WHEELS}" \
uv pip install --system --only-binary=:all: --find-links "${HOMEASSISTANT_WHEELS}" \
--requirement requirements_all.txt \
&& \
uv pip install --system --only-binary=:all: --find-links "${HOMEASSISTANT_WHEELS}" \
Expand Down

0 comments on commit 010370f

Please sign in to comment.