From dad3b6e379bb8b3779945e786646cb898cbaa479 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= Date: Fri, 5 Oct 2018 12:03:31 -0400 Subject: [PATCH] reorder Dockerfile for performance it's better to install/build whipper at the end of the Dockerfile, because it will allow us to cache costly operations like locale-gen while rebuilding with new source changes. --- Dockerfile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5c1033c..0d79d0d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,14 +29,6 @@ RUN curl -o - 'https://ftp.gnu.org/gnu/libcdio/libcdio-paranoia-10.2+0.94+2.tar. RUN ldconfig -# install whipper -RUN mkdir /whipper -COPY . /whipper/ -RUN cd /whipper/src && make && make install \ - && cd /whipper && python2 setup.py install \ - && rm -rf /whipper \ - && whipper -v - # add user RUN useradd -m worker -G cdrom \ && mkdir -p /output /home/worker/.config/whipper \ @@ -50,6 +42,14 @@ RUN echo "LC_ALL=en_US.UTF-8" >> /etc/environment \ && locale-gen en_US.UTF-8 \ && apt-get clean && apt-get autoremove -y +# install whipper +RUN mkdir /whipper +COPY . /whipper/ +RUN cd /whipper/src && make && make install \ + && cd /whipper && python2 setup.py install \ + && rm -rf /whipper \ + && whipper -v + ENV LC_ALL=en_US.UTF-8 ENV LANG=en_US ENV LANGUAGE=en_US.UTF-8