diff --git a/Docker/Dockerfile b/Docker/Dockerfile
index c662dd5c17d2dada258f141a5929cccfb6ca12e6..d72282f9e4d23306a2d85fe7582429ea37332dd1 100644
--- a/Docker/Dockerfile
+++ b/Docker/Dockerfile
@@ -88,13 +88,17 @@ RUN mkdir /home/lofaruser/ && \
     useradd --no-log-init -r -g lofaruser lofaruser && \
     chown lofaruser:lofaruser /home/lofaruser
 
+ARG TOIL_VERSION=3.20.0
+LABEL toil.version=${TOIL_VERSION}
+
 ARG LSMTool_TAG=master
 LABEL LSMTool.version.tag=${LSMTool_TAG}
+
 ARG LoSoTo_TAG=master
 LABEL LoSoTo.version.tag=${LoSoTo_TAG}
     
 RUN apt-get update && apt-get install -y nodejs python3-pip git wsclean
-RUN python3 -m pip install cwltool cwl-runner -e "git://github.com/darafferty/LSMTool.git@${LSMTool_TAG}#egg=LSMTool" git+https://github.com/DataBiosphere/toil
+RUN python3 -m pip install cwltool cwl-runner -e "git://github.com/darafferty/LSMTool.git@${LSMTool_TAG}#egg=LSMTool" toil[cwl]==${TOIL_VERSION}
 
 RUN python3 -m pip install -e "git+https://github.com/revoltek/losoto.git@${LoSoTo_TAG}#egg=LoSoTo"
 
diff --git a/Docker/build_docker.sh b/Docker/build_docker.sh
index 667b4fdc818b88be06335800a7f8103d8de6698b..e39c94963ca43d00b07b69aa10c0f4095c144eaf 100755
--- a/Docker/build_docker.sh
+++ b/Docker/build_docker.sh
@@ -14,6 +14,8 @@ DP3_TAG=v4.1
 IDG_TAG=0.6
 LSMTool_TAG=v1.4.2
 LoSoTo_TAG=f0398b
+TOIL_VERSION=3.20.0
+
 
 # FETCHES THE IDG
 git_clone_or_pull https://gitlab.com/astron-idg/idg/ ${IDG_TAG} idg
@@ -34,4 +36,5 @@ docker build ${DOCKER_PATH} --build-arg=IDG_TAG=${IDG_TAG}\
                             --build-arg=DP3_TAG=${DP3_TAG}\
                             --build-arg=LSMTool_TAG=${LSMTool_TAG}\
                             --build-arg=LoSoTo_TAG=${LoSoTo_TAG}\
+                            --build-arg=TOIL_VERSION=${TOIL_VERSION}\
                             -t lofareosc/prefactor-ci