From d556c60e3fc37dced59d3896be5c3d3475c6fc3c Mon Sep 17 00:00:00 2001 From: Martin <25747549+martgras@users.noreply.github.com> Date: Mon, 17 May 2021 14:19:31 +0200 Subject: [PATCH] Fix docker build failure (#1179) * Fix docker build failure Fix the docker build error from https://github.com/esphome/issues/issues/2041 * Switch from ubuntu to python-slim Using python:slim instead of python reduces the image size from ~1.1 GB to 410MB --- Dockerfile | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0cc95621a..df93220a7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,22 +1,18 @@ -FROM ubuntu:xenial +FROM python:slim RUN apt-get update && apt-get install -y --no-install-recommends \ curl \ - python3 \ - python3-pip \ - python3-setuptools \ - python3-pygments \ git \ make \ doxygen \ openssh-client \ software-properties-common \ - && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* + && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* RUN pip3 install --no-cache-dir --no-binary :all: \ sphinx EXPOSE 8000 -WORKDIR /data/esphome-docs +WORKDIR /data/esphomedocs CMD ["make", "webserver"]