diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 476eb2d16407226d0a96101fa3cf1a1aedfec41f..abdba0583a1bafc474badb6359e649fde3878fba 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -74,7 +74,9 @@ build-services-linux-release:
     # special treatment for receiver dependencies.
     - KAFKA_LIBS=$(dpkg -L librdkafka-dev | grep "\.so")
     - FABRIC_LIBS=$(dpkg -L libfabric-dev | grep "\.so")
-    - printf "${KAFKA_LIBS}\n${FABRIC_LIBS}" > $CI_PROJECT_DIR/build/receiver/dependencies
+    - CURL_LIBS=$(dpkg -L libcurl4-openssl-dev | grep "\.so")
+    - DEPENDENCIES=$(printf "${KAFKA_LIBS}\n${FABRIC_LIBS}\n${CURL_LIBS}" | sed -e 's/\/\(.\+\)\/\(.\+\)/COPY \/\1\/\2 \/lib\/\2/g' | awk '{printf "%s\\n", $0}')
+    - sed -e "s|#REPLACE_COPY_LIBS|${DEPENDENCIES}|g" -i $CI_PROJECT_DIR/build/receiver/Dockerfile
   tags:
     - kubernetes-executor
   rules:
@@ -98,8 +100,7 @@ build-services-docker:
     - >
       for service in $services; do
           service_dir=${service//"-"/"_"}
-          if [[ -f $CI_PROJECT_DIR/build/${service_dir}/dependencies ]]; then DEPENDENCY_LIBS=$(<$CI_PROJECT_DIR/build/${service_dir}/dependencies); else DEPENDENCY_LIBS=''; fi
-          IFS='' /kaniko/executor --cache=false --context $CI_PROJECT_DIR/build/${service_dir} --dockerfile $CI_PROJECT_DIR/build/${service_dir}/Dockerfile --destination $CI_REGISTRY_IMAGE/asapo-dev-${service}:${CI_COMMIT_SHORT_SHA} --build-arg "CI_REGISTRY_IMAGE='${CI_REGISTRY_IMAGE}'" --build-arg "DEPENDENCY_LIBS='${DEPENDENCY_LIBS}'"
+          IFS='' /kaniko/executor --cache=false --context $CI_PROJECT_DIR/build/${service_dir} --dockerfile $CI_PROJECT_DIR/build/${service_dir}/Dockerfile --destination $CI_REGISTRY_IMAGE/asapo-dev-${service}:${CI_COMMIT_SHORT_SHA} --build-arg "CI_REGISTRY_IMAGE='${CI_REGISTRY_IMAGE}'"
       done
   tags:
     - kubernetes-executor
diff --git a/receiver/docker/Dockerfile b/receiver/docker/Dockerfile
index d9ef275015069f29979ddd689089da0e5a5cbc6e..c604d947343c41eedebd42c989a19eaa01cba316 100644
--- a/receiver/docker/Dockerfile
+++ b/receiver/docker/Dockerfile
@@ -1,5 +1,5 @@
 FROM $CI_REGISTRY_IMAGE/asapo-services-linux-build-env:latest
-COPY $DEPENDENCY_LIBS /
+#REPLACE_COPY_LIBS
 
 FROM busybox:glibc
 COPY receiver /