build qemu: fix docker hangs with large UID
Docker build hangs when the user has a large UID. As suggested in
https://github.com/moby/moby/issues/5419, -l or --no-log-init is
a workaround.
Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: I1f8cc43a14e146675a8c53d353d5126e39c009e0
diff --git a/scripts/build-qemu-robot-docker.sh b/scripts/build-qemu-robot-docker.sh
index b1a3055..7de8bb1 100755
--- a/scripts/build-qemu-robot-docker.sh
+++ b/scripts/build-qemu-robot-docker.sh
@@ -145,7 +145,7 @@
&& chmod a+x /usr/local/bin/geckodriver
RUN grep -q ${GROUPS[0]} /etc/group || groupadd -g ${GROUPS[0]} ${USER}
-RUN grep -q ${UID} /etc/passwd || useradd -d ${HOME} -m -u ${UID} -g ${GROUPS[0]} \
+RUN grep -q ${UID} /etc/passwd || useradd -d ${HOME} -l -m -u ${UID} -g ${GROUPS[0]} \
${USER}
USER ${USER}
RUN /bin/bash