Skip to content

Commit bc7aea6

Browse files
committed
chore(devcontainer): use mirror to speed up pip
1 parent faa9ea2 commit bc7aea6

File tree

5 files changed

+11
-3
lines changed

5 files changed

+11
-3
lines changed

.devcontainer/Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ RUN apt-get update && apt-get install -y \
1111
curl \
1212
wget
1313

14-
# Use mirror sources to speed up
15-
COPY sources.list.d /tmp/sources.list.d
14+
# Use mirror to speed up
15+
COPY apt/sources.list.d /tmp/sources.list.d
1616
RUN /tmp/sources.list.d/init.sh \
1717
&& rm -rf /tmp/sources.list.d
1818

@@ -39,12 +39,15 @@ RUN apt-get update && apt-get install -y \
3939
# Unminimize to restore human-friendly tools that are missing from a minimal install
4040
RUN yes | unminimize
4141

42-
# Set locale
42+
# Generate locale
4343
RUN locale-gen en_US.UTF-8
4444

4545
# Set zsh as default shell
4646
RUN chsh -s /bin/zsh
4747

48+
# Use mirror to speed up
49+
COPY pip/pip.conf /root/.pip/pip.conf
50+
4851
# Install Python
4952
RUN apt-get update && apt-get install -y \
5053
python3 \

.devcontainer/pip/pip.conf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[global]
2+
index-url = https://mirrors.aliyun.com/pypi/simple/
3+
4+
[install]
5+
trusted-host = mirrors.aliyun.com

0 commit comments

Comments
 (0)