diff --git a/Dockerfile b/Dockerfile
index c9965180c12e7d1a9b4095f7759d37335c9817db..2134ae81150a13dbab8282149a04df0fb8d20235 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -64,6 +64,7 @@ RUN set -e; \
              ${ALEKSIS_static__root} \
              ${ALEKSIS_media__root} \
              ${ALEKSIS_backup__location}; \
+    dpkg-divert --rename --add /usr/lib/$(py3versions -d)/EXTERNALLY-MANAGED; \
     eatmydata pip install AlekSIS-Core\[$EXTRAS\]$APP_VERSION
 
 # Define entrypoint, volumes and uWSGI running on port 8000