From 7ceeec43c92348ba3209c6c90ad508e10d74b18f Mon Sep 17 00:00:00 2001 From: Disassembler Date: Wed, 24 Jan 2018 16:28:41 +0100 Subject: [PATCH] Cleanup root directory without recreating it --- ckan-datapusher/Dockerfile | 3 +-- crisiscleanup/Dockerfile | 8 +++----- gnuhealth/Dockerfile | 4 +--- openmapkit/Dockerfile | 5 ++--- pandora/Dockerfile | 3 +-- 5 files changed, 8 insertions(+), 15 deletions(-) diff --git a/ckan-datapusher/Dockerfile b/ckan-datapusher/Dockerfile index 5bed824..bf6787b 100644 --- a/ckan-datapusher/Dockerfile +++ b/ckan-datapusher/Dockerfile @@ -29,8 +29,7 @@ RUN \ # Cleanup && apk del .deps \ && find /srv/ckan-datapusher/src -name '.git*' -exec rm -rf {} + \ - && rm -rf /root \ - && mkdir /root + && rm -rf /root/.cache VOLUME ["/etc/ckan-datapusher", "/srv/ckan-datapusher/data"] EXPOSE 8004 diff --git a/crisiscleanup/Dockerfile b/crisiscleanup/Dockerfile index c3c867a..815f040 100644 --- a/crisiscleanup/Dockerfile +++ b/crisiscleanup/Dockerfile @@ -38,8 +38,7 @@ RUN \ && cd /tmp \ && rm -r /usr/src/ruby \ && apk del .deps \ - && rm -rf /root \ - && mkdir /root + && rm -rf /root/.gem ENV RAILS_ENV production @@ -71,10 +70,9 @@ RUN \ && chown -R crisiscleanup:crisiscleanup /srv/crisiscleanup \ # Cleanup && apk del .deps \ - && rm -rf /srv/crisiscleanup/.git* \ + && find /srv/crisiscleanup -name '.git*' -exec rm -rf {} + \ && rm -rf /usr/local/share/.cache \ - && rm -rf /root \ - && mkdir /root + && rm -rf /root/.bundle /root/.config /root/.npm VOLUME ["/srv/crisiscleanup/config"] EXPOSE 8005 diff --git a/gnuhealth/Dockerfile b/gnuhealth/Dockerfile index dbf3d2f..4954e1d 100644 --- a/gnuhealth/Dockerfile +++ b/gnuhealth/Dockerfile @@ -39,9 +39,7 @@ RUN \ # Cleanup && apk del .deps \ && find /srv/gnuhealth -name '.git*' -exec rm -rf {} + \ - && rm -rf /usr/local/share/.cache \ - && rm -rf /root \ - && mkdir /root + && rm -rf /usr/local/share/.cache VOLUME ["/srv/gnuhealth/gnuhealth/tryton/server/config"] EXPOSE 8008 diff --git a/openmapkit/Dockerfile b/openmapkit/Dockerfile index 9c53f59..cb99f3d 100644 --- a/openmapkit/Dockerfile +++ b/openmapkit/Dockerfile @@ -39,10 +39,9 @@ RUN \ && chown -R omk:omk /srv/openmapkit \ # Cleanup && apk del .deps \ - && rm -rf /srv/openmapkit/.git* /srv/openmapkit/api/odk/pyxform/.git* \ + && find /srv/openmapkit -name '.git*' -exec rm -rf {} + \ && rm -rf /usr/local/share/.cache \ - && rm -rf /root \ - && mkdir /root + && rm -rf /root/.cache /root/.config /root/.node-gyp /root/.npm VOLUME ["/srv/openmapkit/data"] EXPOSE 8007 diff --git a/pandora/Dockerfile b/pandora/Dockerfile index cd5b239..dbac46e 100644 --- a/pandora/Dockerfile +++ b/pandora/Dockerfile @@ -70,8 +70,7 @@ RUN \ && apk del .deps \ && find /srv/pandora -name '.git*' -exec rm -rf {} + \ && rm -rf /tmp/lib* /tmp/oxframe \ - && rm -rf /root \ - && mkdir /root + && rm -rf /root/.cache /root/.ox COPY --chown=8011:8011 docker/srv/ /srv/