build-unit-test-docker: use heredoc-copy for wgetrc

The "heredoc" support in Docker can be a bit tedious with indented
content. Most of the examples do not indent it, but start at the
beginning [1].

To prevent any weird behavior with "RUN cat" heredoc's, we should
use the native "COPY heredoc" feature which is mentioned at the end
of the blog [1].

[1] https://www.docker.com/blog/introduction-to-heredocs-in-dockerfiles/

Fixes: f7e5261 ("build-unit-test-docker: Add .wgetrc for proxy")
Change-Id: I41b09c093fe5c5954e0411582806434ae6a148d0
Signed-off-by: Tan Siewert <tan@siewert.io>
diff --git a/scripts/build-unit-test-docker b/scripts/build-unit-test-docker
index 80a0e03..5dcc4c9 100755
--- a/scripts/build-unit-test-docker
+++ b/scripts/build-unit-test-docker
@@ -770,10 +770,10 @@
     proxy_cmd = f"""
 RUN echo "[http]" >> {homedir}/.gitconfig && \
     echo "proxy = {http_proxy}" >> {homedir}/.gitconfig
-RUN cat > {homedir}/.wgetrc <<EOF_WGETRC
-    https_proxy = {http_proxy}
-    http_proxy = {http_proxy}
-    use_proxy = on
+COPY <<EOF_WGETRC {homedir}/.wgetrc
+https_proxy = {http_proxy}
+http_proxy = {http_proxy}
+use_proxy = on
 EOF_WGETRC
 """
     proxy_keyserver = f"--keyserver-options http-proxy={http_proxy}"