home-assistant-core/Dockerfile
Jean Regisser 45f6f4443a Uninstall enum34 in python3.6 docker image (#8103)
* Uninstall enum34 in python3.6 docker image

This is a short term fix for #7733

What's happening is the following dependencies are pulling enum34:
- pygatt
- libsoundtouch
- yeelight
However, enum34 is not meant to be installed in Python versions 3.4+
and causing the `AttributeError: module 'enum' has no attribute 'IntFlag'``

I've submitted patches to these projects so we don't have to do this
manual uninstall in the future.

* Update Dockerfile
2017-06-23 22:29:39 -07:00

34 lines
943 B
Docker

FROM python:3.6
MAINTAINER Paulus Schoutsen <Paulus@PaulusSchoutsen.nl>
# Uncomment any of the following lines to disable the installation.
#ENV INSTALL_TELLSTICK no
#ENV INSTALL_OPENALPR no
#ENV INSTALL_FFMPEG no
#ENV INSTALL_LIBCEC no
#ENV INSTALL_PHANTOMJS no
#ENV INSTALL_COAP_CLIENT no
#ENV INSTALL_SSOCR no
VOLUME /config
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# Copy build scripts
COPY virtualization/Docker/ virtualization/Docker/
RUN virtualization/Docker/setup_docker_prereqs
# Install hass component dependencies
COPY requirements_all.txt requirements_all.txt
# Uninstall enum34 because some depenndecies install it but breaks Python 3.4+.
# See PR #8103 for more info.
RUN pip3 install --no-cache-dir -r requirements_all.txt && \
pip3 install --no-cache-dir mysqlclient psycopg2 uvloop cchardet && \
pip3 uninstall enum34
# Copy source
COPY . .
CMD [ "python", "-m", "homeassistant", "--config", "/config" ]