mirror of
https://github.com/home-assistant/core.git
synced 2025-04-25 01:38:02 +00:00
Re-order Dockerfile for faster rebuild on code changes
This commit is contained in:
parent
7acb3dffe4
commit
09a82dedf0
12
Dockerfile
12
Dockerfile
@ -1,19 +1,27 @@
|
|||||||
FROM python:3-onbuild
|
FROM python:3
|
||||||
MAINTAINER Paulus Schoutsen <Paulus@PaulusSchoutsen.nl>
|
MAINTAINER Paulus Schoutsen <Paulus@PaulusSchoutsen.nl>
|
||||||
|
|
||||||
VOLUME /config
|
VOLUME /config
|
||||||
|
|
||||||
RUN pip3 install --no-cache-dir -r requirements_all.txt
|
RUN mkdir -p /usr/src/app
|
||||||
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
# For the nmap tracker
|
# For the nmap tracker
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y --no-install-recommends nmap net-tools && \
|
apt-get install -y --no-install-recommends nmap net-tools && \
|
||||||
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||||
|
|
||||||
|
COPY script/build_python_openzwave script/build_python_openzwave
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y cython3 libudev-dev && \
|
apt-get install -y cython3 libudev-dev && \
|
||||||
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
|
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
|
||||||
pip3 install "cython<0.23" && \
|
pip3 install "cython<0.23" && \
|
||||||
script/build_python_openzwave
|
script/build_python_openzwave
|
||||||
|
|
||||||
|
COPY requirements_all.txt requirements_all.txt
|
||||||
|
RUN pip3 install --no-cache-dir -r requirements_all.txt
|
||||||
|
|
||||||
|
# Copy source
|
||||||
|
COPY . .
|
||||||
|
|
||||||
CMD [ "python", "-m", "homeassistant", "--config", "/config" ]
|
CMD [ "python", "-m", "homeassistant", "--config", "/config" ]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user