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