diff --git a/Dockerfile b/Dockerfile
index 680dd865453a1f3312b76dc483291fed0e80a0c3..00c98747d4c9ad3ebc2cd27796963452a47e7896 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -5,7 +5,10 @@ ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
 ENV PATH /opt/conda/bin:$PATH
 
 RUN apt-get update --fix-missing && \
-    apt-get install -y wget bzip2 ca-certificates curl git && \
+    apt-get install -y wget bzip2 ca-certificates curl git \  # for miniconda
+    texlive-full python-pygments gnuplot make \  # for TeX
+    build-essential \  # for gcc
+    && \
     apt-get clean && \
     rm -rf /var/lib/apt/lists/*
 
@@ -21,13 +24,6 @@ ENV TINI_VERSION v0.16.1
 ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /usr/bin/tini
 RUN chmod +x /usr/bin/tini
 
-RUN apt-get update -q && apt-get install -qy \
-    # texlive-full \
-    python-pygments gnuplot \
-    make git \
-    build-essential \
-    && rm -rf /var/lib/apt/lists/*
-
 RUN mkdir /environments
 COPY environment.yml /environments/