From 1da51ba3049e116e2cbcaf96805d01413d34a97d Mon Sep 17 00:00:00 2001
From: Moritz Maxeiner <mm@ucw.sh>
Date: Mon, 2 Mar 2020 13:32:42 +0100
Subject: [PATCH] windows1809,centos-7: Prevent Qt installer from phoning home
 and requiring account login

---
 centos-7/Dockerfile         | 1 +
 windows1809/base/Dockerfile | 1 +
 2 files changed, 2 insertions(+)

diff --git a/centos-7/Dockerfile b/centos-7/Dockerfile
index 28ee69c..6626b94 100644
--- a/centos-7/Dockerfile
+++ b/centos-7/Dockerfile
@@ -107,6 +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 && \
     source /etc/profile && \
     cd /tmp && \
     curl -sSLO https://download.qt.io/official_releases/qt/${version%.*}/${version}/qt-opensource-linux-x64-${version}.run && \
diff --git a/windows1809/base/Dockerfile b/windows1809/base/Dockerfile
index fddbad4..82ce4eb 100644
--- a/windows1809/base/Dockerfile
+++ b/windows1809/base/Dockerfile
@@ -30,6 +30,7 @@ COPY qtifwsilent.qs C:/qtifwsilent.qs
 RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
     (New-Object Net.WebClient).DownloadFile('https://download.qt.io/official_releases/qt/5.12/5.12.6/qt-opensource-windows-x86-5.12.6.exe', 'C:/qt.exe'); \
     $env:QT_INSTALL_DIR = 'C:/Qt'; \
+    Add-Content "\"/Windows/System32/drivers/etc/hosts\"" "\"`r`n127.0.0.1 iapi.qt.io`r`n::1 iapi.qt.io\""; \
     Start-Process C:/qt.exe -NoNewWindow -Wait -ArgumentList '--verbose --script C:/qtifwsilent.qs'; \
     Remove-Item -Force C:/qtifwsilent.qs; \
     Remove-Item -Force C:/qt.exe; \
-- 
GitLab