diff --git a/.gitlab-ci.yaml b/.gitlab-ci.yaml
index 805042bf94aff51985de418020933c17b49adc14..07c221365386ed5ac2c5a52a8c5a9e51687262ee 100644
--- a/.gitlab-ci.yaml
+++ b/.gitlab-ci.yaml
@@ -321,7 +321,7 @@ cleanup_haf_cache_manual:
 
 download_await:
   extends: .job-defaults
-  image: $CI_REGISTRY_IMAGE/ci-base-image:python-3.8-slim-4
+  image: $CI_REGISTRY_IMAGE/ci-base-image:python-3.8-slim-5
   stage: prepare
   variables:
     GIT_STRATEGY: none
@@ -412,7 +412,7 @@ sync:
     - data-cache-storage
 
 e2e_benchmark:
-  image: $CI_REGISTRY_IMAGE/ci-base-image:python-3.8-slim-4
+  image: $CI_REGISTRY_IMAGE/ci-base-image:python-3.8-slim-5
   stage: benchmark
   interruptible: true
   needs:
diff --git a/Dockerfile b/Dockerfile
index 4f54261b81ff0541ec67a721140bdaa75328b7a3..d90267239666d20e55ac265a4590f44c68fa958a 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -39,6 +39,8 @@ RUN <<EOF
   useradd -ms /bin/bash -c "Hivemind service account" -u 1000 "hivemind" --groups users
 EOF
 
+COPY --chmod=755 --from=pure_postgrest /bin/postgrest /usr/local/bin
+
 SHELL ["/bin/bash", "-c"] 
 
 FROM runtime AS ci-base-image
@@ -120,7 +122,6 @@ WORKDIR /home/hivemind
 
 SHELL ["/bin/bash", "-c"] 
 
-COPY --chmod=755 --from=pure_postgrest /bin/postgrest /usr/local/bin
 COPY --from=builder --chown=hivemind:hivemind  /home/hivemind/app/dist /home/hivemind/dist 
 COPY --from=builder --chown=hivemind:hivemind  /home/hivemind/.hivemind-venv /home/hivemind/.hivemind-venv 
 COPY --from=builder --chown=hivemind:hivemind  /home/hivemind/app/docker/docker_entrypoint.sh .
diff --git a/scripts/ci/build_ci_base_image.sh b/scripts/ci/build_ci_base_image.sh
index b86cab3f86b195cedd00332099bd4ce5b3d6dfd1..e97d7c1142aafdeed9f5df7e93d34237e4c7a01b 100755
--- a/scripts/ci/build_ci_base_image.sh
+++ b/scripts/ci/build_ci_base_image.sh
@@ -10,7 +10,7 @@ cat <<EOF
   
   Options:
     --registry=URL Registry to use as a part of image names (default: registry.gitlab.syncad.com/hive/hivemind)
-    --tag=TAG      Image tag (default: python-3.8-slim-4)
+    --tag=TAG      Image tag (default: python-3.8-slim-5)
 EOF
 }
 
@@ -21,7 +21,7 @@ function image-exists() {
 }
 
 REGISTRY=${REGISTRY:-"registry.gitlab.syncad.com/hive/hivemind"}
-CI_IMAGE_TAG=${CI_IMAGE_TAG:-"python-3.8-slim-4"}
+CI_IMAGE_TAG=${CI_IMAGE_TAG:-"python-3.8-slim-5"}
 
 while [ $# -gt 0 ]; do
   case "$1" in