Ver Fonte

fix /config perms

Fabian Peter Hammerle há 5 anos atrás
pai
commit
cfe5ea1996
1 ficheiros alterados com 4 adições e 3 exclusões
  1. 4 3
      Dockerfile

+ 4 - 3
Dockerfile

@@ -3,20 +3,21 @@ 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 {} \;
 
-VOLUME /config
-
 # 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
+VOLUME /config
+
 USER hass
 ENV PATH "/home/hass/.local/bin:${PATH}"
 
 COPY --chown=hass ./runtime-requirements.txt /tmp
 RUN pip install --user --no-cache-dir --requirement /tmp/runtime-requirements.txt \
     && rm /tmp/runtime-requirements.txt
-
 RUN pip install --user --no-cache-dir cryptography==2.3.1
 
 RUN pip install --user --no-cache-dir \