From d403c91ca2b217d3998e7c5c385544d0fa414e0c Mon Sep 17 00:00:00 2001 From: Anton Ouzounov Date: Tue, 29 Jun 2021 10:51:34 -0400 Subject: [PATCH] fix(Dockerfile): add tdnf clean commands - clear out tdnf cache around `tdnf upgrade` command Signed-off-by: Anton Ouzounov --- base-image/Dockerfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/base-image/Dockerfile b/base-image/Dockerfile index 6a5b39c9..c78513c7 100644 --- a/base-image/Dockerfile +++ b/base-image/Dockerfile @@ -10,7 +10,8 @@ FROM photon:4.0 AS rubybuild ARG RUBY_PATH ARG RUBY_VERSION ARG RUBYOPT -RUN tdnf upgrade -y && \ +RUN tdnf clean all && \ + tdnf upgrade -y && \ tdnf erase -y toybox && \ tdnf install -y \ bzip2 \ @@ -33,7 +34,8 @@ RUN tdnf upgrade -y && \ openssl-devel \ systemd \ net-tools \ - git + git && \ + tdnf clean all # Copy Gemfile.lock to pin versions further: COPY basegems/Gemfile Gemfile @@ -123,7 +125,8 @@ RUN mkdir -p /fluentd/log /fluentd/etc /fluentd/plugins /usr/local/bundle/bin/ \ && tdnf clean all \ && gem sources --clear-all \ && ln -s $(which fluentd) /usr/local/bundle/bin/fluentd \ - && tdnf remove -y $buildDeps + && tdnf remove -y $buildDeps \ + && tdnf clean all # Make sure fluentd picks jemalloc 3.6.0 lib as default ENV LD_PRELOAD="/usr/lib/libjemalloc.so"