|
@@ -1,17 +1,18 @@
|
|
|
-FROM python:3.7
|
|
|
-
|
|
|
-RUN find /usr/bin -type f -perm /u+s -exec echo chmod --changes u-s {} \;
|
|
|
-RUN find /usr/bin -type f -perm /g+s -exec echo chmod --changes g-s {} \;
|
|
|
-
|
|
|
-# required to build python_openzwave
|
|
|
-# https://github.com/OpenZWave/python-openzwave
|
|
|
-RUN apt-get update && apt-get install --yes make g++ libudev-dev libyaml-dev
|
|
|
-
|
|
|
-RUN useradd --create-home hass && chown hass ~hass
|
|
|
-
|
|
|
-RUN mkdir /config && chown hass /config
|
|
|
+FROM python:3.7-alpine3.9
|
|
|
+
|
|
|
+RUN apk add --no-cache \
|
|
|
+ eudev-dev `#python_openzwave` \
|
|
|
+ g++ \
|
|
|
+ gcc \
|
|
|
+ libffi-dev `#pycares` \
|
|
|
+ linux-headers `#python_openzwave` \
|
|
|
+ make \
|
|
|
+ openssl-dev `#cryptography`
|
|
|
+
|
|
|
+RUN adduser -D hass \
|
|
|
+ && mkdir /config \
|
|
|
+ && chown hass /config
|
|
|
VOLUME /config
|
|
|
-
|
|
|
USER hass
|
|
|
ENV PATH "/home/hass/.local/bin:${PATH}"
|
|
|
|