diff options
author | Eric Anderson <ejona@google.com> | 2018-03-28 17:06:47 -0700 |
---|---|---|
committer | Eric Anderson <ejona@google.com> | 2018-03-28 17:24:07 -0700 |
commit | 67c1cd4cb7d347241bc7a9e6989a0a6a062e4607 (patch) | |
tree | 0be0443dbc6321733f59706aa4c9d1e4d4cfa6a6 | |
parent | 5f052ae7ae8a757dd919e95e0f1481e08fef749b (diff) |
protoc-artifacts: Avoid storing temporary files and use fewer layers
This is just better Dockerfile hygene as it produces smaller resulting
images with fewer useless files.
-rw-r--r-- | protoc-artifacts/Dockerfile | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/protoc-artifacts/Dockerfile b/protoc-artifacts/Dockerfile index 82cd97ec..26446937 100644 --- a/protoc-artifacts/Dockerfile +++ b/protoc-artifacts/Dockerfile @@ -11,7 +11,9 @@ RUN yum install -y git \ libtool \ glibc-static.i686 \ glibc-devel \ - glibc-devel.i686 + glibc-devel.i686 \ + && \ + yum clean all # Install Java 8 RUN wget -q --no-cookies --no-check-certificate \ @@ -27,13 +29,15 @@ RUN wget -q http://apache.cs.utah.edu/maven/maven-3/3.3.9/binaries/apache-maven- ENV PATH /var/local/apache-maven-3.3.9/bin:$PATH # Install GCC 4.7 to support -static-libstdc++ -RUN wget http://people.centos.org/tru/devtools-1.1/devtools-1.1.repo -P /etc/yum.repos.d -RUN bash -c 'echo "enabled=1" >> /etc/yum.repos.d/devtools-1.1.repo' -RUN bash -c "sed -e 's/\$basearch/i386/g' /etc/yum.repos.d/devtools-1.1.repo > /etc/yum.repos.d/devtools-i386-1.1.repo" -RUN sed -e 's/testing-/testing-i386-/g' -i /etc/yum.repos.d/devtools-i386-1.1.repo -RUN rpm --rebuilddb && yum install -y devtoolset-1.1 \ +RUN wget http://people.centos.org/tru/devtools-1.1/devtools-1.1.repo -P /etc/yum.repos.d && \ + bash -c 'echo "enabled=1" >> /etc/yum.repos.d/devtools-1.1.repo' && \ + bash -c "sed -e 's/\$basearch/i386/g' /etc/yum.repos.d/devtools-1.1.repo > /etc/yum.repos.d/devtools-i386-1.1.repo" && \ + sed -e 's/testing-/testing-i386-/g' -i /etc/yum.repos.d/devtools-i386-1.1.repo && \ + rpm --rebuilddb && \ + yum install -y devtoolset-1.1 \ devtoolset-1.1-libstdc++-devel \ - devtoolset-1.1-libstdc++-devel.i686 + devtoolset-1.1-libstdc++-devel.i686 && \ + yum clean all # Start in devtoolset environment that uses GCC 4.7 CMD ["scl", "enable", "devtoolset-1.1", "bash"] |