2017-01-02 22:04:09 +01:00
|
|
|
# Dockerfile for development
|
|
|
|
|
# Based on the production Dockerfile, but with development additions.
|
|
|
|
|
# Keep this file as close as possible to the production Dockerfile, so the environments match.
|
|
|
|
|
|
2017-06-01 23:23:39 -07:00
|
|
|
FROM python:3.6
|
2017-10-23 15:25:55 +02:00
|
|
|
LABEL maintainer="Paulus Schoutsen <Paulus@PaulusSchoutsen.nl>"
|
2017-01-02 22:04:09 +01:00
|
|
|
|
2017-02-01 04:02:06 +01:00
|
|
|
# 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
|
2017-10-05 17:05:38 +01:00
|
|
|
#ENV INSTALL_COAP no
|
2017-06-15 23:31:30 -04:00
|
|
|
#ENV INSTALL_SSOCR no
|
2017-02-01 04:02:06 +01:00
|
|
|
|
2017-01-02 22:04:09 +01:00
|
|
|
VOLUME /config
|
|
|
|
|
|
|
|
|
|
RUN mkdir -p /usr/src/app
|
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
|
|
2017-01-14 16:41:41 +01:00
|
|
|
# Copy build scripts
|
2017-02-01 04:02:06 +01:00
|
|
|
COPY virtualization/Docker/ virtualization/Docker/
|
|
|
|
|
RUN virtualization/Docker/setup_docker_prereqs
|
2017-01-09 11:49:11 -05:00
|
|
|
|
2017-01-14 16:41:41 +01:00
|
|
|
# Install hass component dependencies
|
2017-01-02 22:04:09 +01:00
|
|
|
COPY requirements_all.txt requirements_all.txt
|
2017-06-30 17:07:33 +02:00
|
|
|
|
2017-10-20 07:20:33 +01:00
|
|
|
# Uninstall enum34 because some dependencies install it but breaks Python 3.4+.
|
2017-06-30 17:07:33 +02:00
|
|
|
# See PR #8103 for more info.
|
2017-01-02 22:04:09 +01:00
|
|
|
RUN pip3 install --no-cache-dir -r requirements_all.txt && \
|
2017-10-20 07:20:33 +01:00
|
|
|
pip3 install --no-cache-dir mysqlclient psycopg2 uvloop cchardet cython
|
2017-01-02 22:04:09 +01:00
|
|
|
|
|
|
|
|
# BEGIN: Development additions
|
|
|
|
|
|
|
|
|
|
# Install nodejs
|
2017-03-02 03:14:20 -05:00
|
|
|
RUN curl -sL https://deb.nodesource.com/setup_7.x | bash - && \
|
2017-01-02 22:04:09 +01:00
|
|
|
apt-get install -y nodejs
|
|
|
|
|
|
|
|
|
|
# Install tox
|
|
|
|
|
RUN pip3 install --no-cache-dir tox
|
|
|
|
|
|
|
|
|
|
# Copy over everything required to run tox
|
2017-05-10 05:16:46 +02:00
|
|
|
COPY requirements_test_all.txt setup.cfg setup.py tox.ini ./
|
2017-01-02 22:04:09 +01:00
|
|
|
COPY homeassistant/const.py homeassistant/const.py
|
|
|
|
|
|
2017-01-14 16:41:41 +01:00
|
|
|
# Prefetch dependencies for tox
|
2017-08-22 11:48:50 +01:00
|
|
|
COPY homeassistant/package_constraints.txt homeassistant/package_constraints.txt
|
2017-05-10 05:16:46 +02:00
|
|
|
RUN tox -e py36 --notest
|
2017-01-02 22:04:09 +01:00
|
|
|
|
|
|
|
|
# END: Development additions
|
|
|
|
|
|
|
|
|
|
# Copy source
|
|
|
|
|
COPY . .
|
|
|
|
|
|
2017-06-15 23:31:30 -04:00
|
|
|
CMD [ "python", "-m", "homeassistant", "--config", "/config" ]
|