diff --git a/centos-7/Dockerfile b/centos-7/Dockerfile
index 6626b946446e47f2911083af9d0e676ffe306d13..5519a3056d616408957ce0646ffa404ebd9bba59 100644
--- a/centos-7/Dockerfile
+++ b/centos-7/Dockerfile
@@ -107,7 +107,7 @@ RUN version=5.12.7 && \
         gstreamer1-plugins-base \
         && \
     yum clean all && \
-    echo "\n127.0.0.1 iapi.qt.io\n::1 iapi.qt.io" >> /etc/hosts && \
+    echo -e "\n127.0.0.1 iapi.qt.io\n::1 iapi.qt.io" >> /etc/hosts && \
     source /etc/profile && \
     cd /tmp && \
     curl -sSLO https://download.qt.io/official_releases/qt/${version%.*}/${version}/qt-opensource-linux-x64-${version}.run && \