diff --git a/docker/Dockerfile.template b/docker/Dockerfile.template
index 9ec6a35f94e1e48fa945e26fa14b2e5313ea2b6f..791b48217e920b2518df1fd5b4be11fdb03522c7 100644
--- a/docker/Dockerfile.template
+++ b/docker/Dockerfile.template
@@ -68,7 +68,7 @@ RUN pip --default-timeout=1000 install -r pyrat/requirements.txt
 
 ENV PATH "/home/opam/pyrat/:$PATH"
 
-RUN echo "#/usr/bin/sh\n exec /home/opam/miniconda3/envs/python_caisar_env/bin/python /home/opam/pyrat/pyrat.pyc \"\$@\"" > /home/opam/pyrat/pyrat
+RUN echo -e "#!/usr/bin/sh \n exec /home/opam/miniconda3/envs/python_caisar_env/bin/python /home/opam/pyrat/pyrat.pyc \"\$@\"" > /home/opam/pyrat/pyrat
 RUN chmod u+x /home/opam/pyrat/pyrat
 
 RUN pyrat -h