Selaa lähdekoodia

Reduced size of Docker image (#234)

As Docker builds are layer by layer, removing cached package files in different layers do not reduce image size. To reduce image size, cached packages have to removed in the same layer i.e., `RUN` command as the packages have been installed.

Signed-off-by: Riyad Parvez <social.riyad@gmail.com>
Riyad Parvez 9 vuotta sitten
vanhempi
commit
ec1e5734e9
1 muutettua tiedostoa jossa 4 lisäystä ja 4 poistoa
  1. 4 4
      syntaxnet/Dockerfile

+ 4 - 4
syntaxnet/Dockerfile

@@ -15,13 +15,13 @@ RUN mkdir -p $SYNTAXNETDIR \
     && ./bazel-0.2.2b-installer-linux-x86_64.sh --user \
     && git clone --recursive https://github.com/tensorflow/models.git \
     && cd $SYNTAXNETDIR/models/syntaxnet/tensorflow \
-    && echo "\n\n\n" | ./configure
-
-RUN cd $SYNTAXNETDIR/models/syntaxnet \
-    && bazel test --genrule_strategy=standalone syntaxnet/... util/utf8/... \
+    && echo "\n\n\n" | ./configure \
     && apt-get autoremove -y \
     && apt-get clean
 
+RUN cd $SYNTAXNETDIR/models/syntaxnet \
+    && bazel test --genrule_strategy=standalone syntaxnet/... util/utf8/...
+
 WORKDIR $SYNTAXNETDIR/models/syntaxnet
 
 CMD [ "sh", "-c", "echo 'Bob brought the pizza to Alice.' | syntaxnet/demo.sh" ]