diff --git a/Dockerfile b/Dockerfile index 788cc6c..d2787a0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,8 +26,9 @@ WORKDIR /var/ossec/ COPY --from=builder /tmp/wheel /tmp/wheel SHELL ["/bin/bash", "-o", "pipefail", "-c"] -RUN install_packages \ - python3-docker python3-setuptools python3-pip +RUN install_packages python3-docker python3-setuptools python3-pip && \ + apt-get clean autoclean && \ + apt-get autoremove -y RUN install_packages procps curl apt-transport-https gnupg2 inotify-tools && \ curl -s https://packages.wazuh.com/key/GPG-KEY-WAZUH | apt-key add - && \ diff --git a/images/Dockerfile.ubuntu b/images/Dockerfile.ubuntu index 3dde603..a79fee5 100644 --- a/images/Dockerfile.ubuntu +++ b/images/Dockerfile.ubuntu @@ -28,9 +28,8 @@ COPY --from=builder /tmp/wheel /tmp/wheel SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN apt-get update && apt-get install -yq python3-docker python3-setuptools python3-pip && \ apt-get clean autoclean && \ - apt-get autoremove -y && \ - rm -rf /var/lib/{apt,dpkg,cache,log}/ && \ - rm -rf /tmp/* /var/tmp/* /var/log/* + apt-get autoremove -y + WORKDIR /var/ossec/ COPY *.py *.jinja2 /var/ossec/ SHELL ["/bin/bash", "-o", "pipefail", "-c"]