docker/Dockerfile: Use netselect-apt to speed up image build
netselect-apt runs and selects the best debian mirror automatically
according to the region. This can significantly improves package
manager's download speeds.
Fixes
@@ -6,6 +6,13 @@ FROM debian:${release}-slim
ARG DEBIAN_FRONTEND=noninteractive
+RUN \
+ apt-get update -y && \
+ apt-get install -y netselect-apt && \
+ if netselect-apt -n ${release}; then \
+ mv sources.list /etc/apt/sources.list; \
+ fi
+
COPY docker/bin /tmp/simde-bin
RUN \
for script in simde-reset-build.sh; do \
