Skip to content

Commit 2cef071

Browse files
authored
Merge pull request #1832 from reyoung/feature/fix_bug_in_paddle_mirror
Fix Production Docker Image's mirror settings.
2 parents 89f2696 + 36b1beb commit 2cef071

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

paddle/scripts/docker/build.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,8 @@ fi
7575

7676
paddle version
7777

78-
# generate production docker image Dockerfile
79-
if [ ${USE_MIRROR} ]; then
80-
MIRROR_UPDATE="sed 's@http:\/\/archive.ubuntu.com\/ubuntu\/@mirror:\/\/mirrors.ubuntu.com\/mirrors.txt@' -i /etc/apt/sources.list && \\"
78+
if [[ -n ${APT_MIRROR} ]]; then
79+
MIRROR_UPDATE="sed -i '${APT_MIRROR}' /etc/apt/sources.list && \\"
8180
else
8281
MIRROR_UPDATE="\\"
8382
fi

0 commit comments

Comments
 (0)