Browse Source

refactor: merge RUN layers

Fabian Peter Hammerle 4 years ago
parent
commit
ebe290858c
1 changed files with 8 additions and 13 deletions
  1. 8 13
      Dockerfile

+ 8 - 13
Dockerfile

@@ -1,32 +1,27 @@
-FROM debian:buster-slim
+FROM debian:buster-slim as build
 
 RUN apt-get update && apt-get install --yes --no-install-recommends \
+    git \
     gperf \
     gtk-doc-tools \
     intltool \
     libgirepository1.0-dev \
     libgnutls28-dev \
+    libgtk-3-dev \
+    libpcre2-dev \
+    libtool-bin \
     libxml2-utils \
     valac
-RUN apt-get update && apt-get install --yes --no-install-recommends git
-RUN apt-get update && apt-get install --yes --no-install-recommends libtool-bin
 
 ARG VTE_NE_VERSION=0.50.2-ng
 RUN git clone --branch "$VTE_NE_VERSION" https://github.com/thestinger/vte-ng.git /vte-ng
-
-RUN apt-get update && apt-get install --yes --no-install-recommends libgtk-3-dev libpcre2-dev
-
 WORKDIR /vte-ng
-RUN ./autogen.sh
-RUN make
-RUN make install
+RUN ./autogen.sh && make && make install && ldconfig
 
 ARG TERMITE_VERSION=v15
 RUN git clone --recursive --branch "$TERMITE_VERSION" https://github.com/thestinger/termite.git /termite
 WORKDIR /termite
-RUN make
-RUN make install
-
-RUN ldconfig
+RUN make && make install
 
+WORKDIR /
 CMD ["/usr/local/bin/termite"]