diff --git a/Dockerfile b/Dockerfile
index d4ce637a2950b795b6b76be7059367878181d5ba..1c75649cfff1ccf9d409736926fe3636c3338c57 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -38,4 +38,5 @@ COPY scripts/clone-qt.sh /home/build/scripts/clone-qt.sh
 RUN scripts/clone-qt.sh
 
 COPY scripts/ /home/build/scripts
+COPY config.opt /etc/qt/config.opt
 CMD "./scripts/run.sh"
diff --git a/config.opt b/config.opt
new file mode 100644
index 0000000000000000000000000000000000000000..9ed1d25b8c22219b2bb98aa8f153e9ee2f2e4b77
--- /dev/null
+++ b/config.opt
@@ -0,0 +1,13 @@
+-opensource
+-confirm-license
+-developer-build
+-no-xcb
+-no-feature-vnc
+-no-linuxfb
+-no-eglfs
+-nomake
+examples
+-nomake
+tests
+-feature-wayland-client
+-feature-wayland-egl
diff --git a/scripts/build-qt.sh b/scripts/build-qt.sh
index 5044b9a40afeeeef1170eeffc6143978d364fbc2..f3544924d8584a7b7da1314bc847e3bf8f2a7cad 100755
--- a/scripts/build-qt.sh
+++ b/scripts/build-qt.sh
@@ -2,16 +2,6 @@
 set -ex
 mkdir -p build-qt
 cd build-qt
-../qt5/configure \
-    -opensource \
-    -confirm-license \
-    -developer-build \
-    -no-xcb \
-    -no-feature-vnc \
-    -no-linuxfb \
-    -no-eglfs \
-    -nomake examples \
-    -nomake tests \
-    -feature-wayland-client \
-    -feature-wayland-egl
+cp /etc/qt/config.opt .
+../qt5/configure -redo
 make module-qtwayland