diff --git a/bin/start-ds.sh b/bin/start-ds.sh
index 71cb29a29bfa977fbf6033c8479c9e59435485b5..35a7e3890554c2e8d3bd6d55a6f833266e5dfe0a 100755
--- a/bin/start-ds.sh
+++ b/bin/start-ds.sh
@@ -35,7 +35,9 @@ else
   # Install the package, exit 1 if it fails
   # pip install ./ will _NOT_ install dependencies in requirements.txt!
   rm -rf /tmp/tangostationcontrol
-  cp -R /opt/lofar/tango/tangostationcontrol /tmp/
+  # Ideally we would use git copy but it can't copy on subdirectory level
+  # DO NOT PUT SPACES IN THE EXCLUDE LIST!
+  rsync -av --progress --exclude={".tox","*.egg-info","dist","build",".git","*.pyc"} /opt/lofar/tango/tangostationcontrol /tmp/
   cd /tmp/tangostationcontrol || exit 1
   # Remove the build directory if copied from the source
   rm -rf build
diff --git a/docker-compose/lofar-device-base/Dockerfile b/docker-compose/lofar-device-base/Dockerfile
index fb65f701bafcda0da0120e04b95189fafa602f60..d280bf4f3f76f4b71e17cf0fcf6c8fb7ff32e572 100644
--- a/docker-compose/lofar-device-base/Dockerfile
+++ b/docker-compose/lofar-device-base/Dockerfile
@@ -1,7 +1,12 @@
 ARG SOURCE_IMAGE
 FROM ${SOURCE_IMAGE}
 
-RUN sudo apt-get update && sudo apt-get install -y git g++ gcc shellcheck graphviz python3-dev libboost-python-dev pkg-config && sudo apt-get clean
+RUN sudo apt-get update
+RUN sudo apt-get install -y git && sudo apt-get clean
+RUN sudo apt-get install -y g++ gcc && sudo apt-get clean
+RUN sudo apt-get install -y shellcheck graphviz && sudo apt-get clean
+RUN sudo apt-get install -y python3-dev libboost-python-dev pkg-config && sudo apt-get clean
+RUN sudo apt-get install -y rsync && sudo apt-get clean
 
 COPY lofar-device-base/lofar-requirements.txt /lofar-requirements.txt
 RUN sudo pip3 install -r /lofar-requirements.txt