From 96d527a428ea0c6af59533b9db8f14a050ebc40e Mon Sep 17 00:00:00 2001 From: Christian Egli Date: Wed, 20 Sep 2017 15:48:43 +0200 Subject: [PATCH] Update the Dockerfile according to best practices see https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/ --- Dockerfile | 42 +++++++++++++++++++----------------------- 1 file changed, 19 insertions(+), 23 deletions(-) diff --git a/Dockerfile b/Dockerfile index a5a0c4c8eb..a05410f029 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,33 +1,29 @@ FROM debian:jessie -MAINTAINER Liblouis Maintainers "liblouis-liblouisxml@freelists.org" - -# developer environment -RUN apt-get update -RUN apt-get install -y make autoconf automake libtool pkg-config - -# for python bindings -RUN apt-get install -y python - -# for documentation -RUN apt-get install -y texinfo - -# for tests -RUN apt-get install -y libyaml-dev +LABEL maintainer="Liblouis Maintainers " + +# Fetch build dependencies +RUN apt-get update && apt-get install -y \ + autoconf \ + automake \ + curl \ + libtool \ + libyaml-dev \ + make \ + pkg-config \ + python \ + texinfo \ + && rm -rf /var/lib/apt/lists/* # compile and install liblouis -ADD . /tmp/liblouis -WORKDIR /tmp/liblouis -RUN ./autogen.sh -RUN ./configure --enable-ucs4 -RUN make -RUN make install -RUN ldconfig +ADD . /usr/src/liblouis +WORKDIR /usr/src/liblouis +RUN ./autogen.sh && ./configure --enable-ucs4 && make && make install && ldconfig # install python bindings -WORKDIR /tmp/liblouis/python +WORKDIR /usr/src/liblouis/python RUN python setup.py install # clean up WORKDIR /root -RUN rm -rf /tmp/liblouis \ No newline at end of file +RUN rm -rf /usr/src/liblouis