From aff7d9d615cd2aba00d9f2f1b8d03d1f643268a2 Mon Sep 17 00:00:00 2001 From: alone <794000949@qq.com> Date: Mon, 18 Nov 2019 03:05:13 +0800 Subject: [PATCH 1/6] add nvm NVM_NODEJS_ORG_MIRROR --- docker-compose.yml | 1 + env-example | 1 + workspace/Dockerfile | 1 + 3 files changed, 3 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 4f32e05b..41a4aeae 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -77,6 +77,7 @@ services: - INSTALL_GEARMAN=${WORKSPACE_INSTALL_GEARMAN} - INSTALL_PHPREDIS=${WORKSPACE_INSTALL_PHPREDIS} - INSTALL_MSSQL=${WORKSPACE_INSTALL_MSSQL} + - NVM_NODEJS_ORG_MIRROR=${WORKSPACE_NVM_NODEJS_ORG_MIRROR} - INSTALL_NODE=${WORKSPACE_INSTALL_NODE} - NPM_REGISTRY=${WORKSPACE_NPM_REGISTRY} - INSTALL_YARN=${WORKSPACE_INSTALL_YARN} diff --git a/env-example b/env-example index a52f36ef..cdc3874b 100644 --- a/env-example +++ b/env-example @@ -84,6 +84,7 @@ DOCKER_SYNC_STRATEGY=native_osx WORKSPACE_COMPOSER_GLOBAL_INSTALL=true WORKSPACE_COMPOSER_AUTH=false WORKSPACE_COMPOSER_REPO_PACKAGIST= +WORKSPACE_NVM_NODEJS_ORG_MIRROR= WORKSPACE_INSTALL_NODE=true WORKSPACE_NODE_VERSION=node WORKSPACE_NPM_REGISTRY= diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 58bd4633..28ff0a6c 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -580,6 +580,7 @@ ARG INSTALL_NPM_ANGULAR_CLI=false ARG NPM_REGISTRY ENV NPM_REGISTRY ${NPM_REGISTRY} ENV NVM_DIR /home/laradock/.nvm +ENV NVM_NODEJS_ORG_MIRROR=${NVM_NODEJS_ORG_MIRROR} RUN if [ ${INSTALL_NODE} = true ]; then \ # Install nvm (A Node Version Manager) From 461e05d677cff58b7e1727caa7ff0f2bb390a5b6 Mon Sep 17 00:00:00 2001 From: alone <794000949@qq.com> Date: Mon, 18 Nov 2019 03:24:27 +0800 Subject: [PATCH 2/6] change workspace ubuntu sources.list file --- workspace/Dockerfile | 9 +++++ workspace/sources.sh | 81 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100755 workspace/sources.sh diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 28ff0a6c..f9b3ec6d 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -36,6 +36,15 @@ ENV PUID ${PUID} ARG PGID=1000 ENV PGID ${PGID} +COPY ./sources.sh /tmp/sources.sh + +RUN if [ ${CHANGE_SOURCE} = true ]; then \ + chmod +x /tmp/sources.sh && \ + # bash /tmp/sources.sh aliyun + # ./tmp/sources.sh aliyun + /bin/bash /tmp/sources.sh aliyun && \ +;fi + # always run apt update when start and after add new source list, then clean up at end. RUN set -xe; \ apt-get update -yqq && \ diff --git a/workspace/sources.sh b/workspace/sources.sh new file mode 100755 index 00000000..61da3a24 --- /dev/null +++ b/workspace/sources.sh @@ -0,0 +1,81 @@ +#!/bin/bash + +if type "tee" 2>/dev/null && [ -n "$1" ]; then + SOURCE_PATH="/etc/apt/sources.list" + cp ${SOURCE_PATH} ${SOURCE_PATH}.bak && rm -rf ${SOURCE_PATH} + case "$1" in + "aliyun") + tee ${SOURCE_PATH} <<-'EOF' +deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse +deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse +deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse +deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse +deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse +deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse +deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse +deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse +deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse +deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse +EOF +;; + "zju") + tee ${SOURCE_PATH} <<-'EOF' +deb http://mirrors.zju.edu.cn/ubuntu/ bionic main multiverse restricted universe +deb http://mirrors.zju.edu.cn/ubuntu/ bionic-backports main multiverse restricted universe +deb http://mirrors.zju.edu.cn/ubuntu/ bionic-proposed main multiverse restricted universe +deb http://mirrors.zju.edu.cn/ubuntu/ bionic-security main multiverse restricted universe +deb http://mirrors.zju.edu.cn/ubuntu/ bionic-updates main multiverse restricted universe +deb-src http://mirrors.zju.edu.cn/ubuntu/ bionic main multiverse restricted universe +deb-src http://mirrors.zju.edu.cn/ubuntu/ bionic-backports main multiverse restricted universe +deb-src http://mirrors.zju.edu.cn/ubuntu/ bionic-proposed main multiverse restricted universe +deb-src http://mirrors.zju.edu.cn/ubuntu/ bionic-security main multiverse restricted universe +deb-src http://mirrors.zju.edu.cn/ubuntu/ bionic-updates main multiverse restricted universe +EOF +;; + "tsinghua") + tee ${SOURCE_PATH} <<-'EOF' +deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse +deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse +deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse +deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse +deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse +deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse +deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse +deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse +deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse +deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse +EOF +;; + "163") + tee ${SOURCE_PATH} <<-'EOF' +deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse +deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse +deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse +deb http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse +deb http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse +deb-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse +deb-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse +deb-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse +deb-src http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse +deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse +EOF +;; + "ustc") + tee ${SOURCE_PATH} <<-'EOF' +deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse +deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse +deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse +deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse +deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse +deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse +deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse +deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse +deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse +deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse +EOF +;; + *) + echo "Please check whether there is aliyun|zju|tsinghua|163|ustc in the parameter" + exit 1;; + esac +fi \ No newline at end of file From 24361ca818ca41577d8f8de4966b36de84445002 Mon Sep 17 00:00:00 2001 From: alone <794000949@qq.com> Date: Sat, 30 Nov 2019 08:51:23 +0800 Subject: [PATCH 3/6] add ubuntu sources.list --- docker-compose.yml | 3 ++ env-example | 2 ++ workspace/Dockerfile | 8 ++--- workspace/sources.sh | 81 -------------------------------------------- 4 files changed, 9 insertions(+), 85 deletions(-) delete mode 100755 workspace/sources.sh diff --git a/docker-compose.yml b/docker-compose.yml index 41a4aeae..d1fde5c7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -133,6 +133,8 @@ services: - http_proxy - https_proxy - no_proxy + - CHANGE_SOURCE=${CHANGE_SOURCE} + - UBUNTU_SOURCE=${UBUNTU_SOURCE} volumes: - ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG} - ./php-worker/supervisord.d:/etc/supervisord.d @@ -156,6 +158,7 @@ services: context: ./php-fpm args: - CHANGE_SOURCE=${CHANGE_SOURCE} + - UBUNTU_SOURCE=${UBUNTU_SOURCE} - LARADOCK_PHP_VERSION=${PHP_VERSION} - LARADOCK_PHALCON_VERSION=${PHALCON_VERSION} - INSTALL_XDEBUG=${PHP_FPM_INSTALL_XDEBUG} diff --git a/env-example b/env-example index cdc3874b..aee4d62d 100644 --- a/env-example +++ b/env-example @@ -69,6 +69,8 @@ COMPOSE_CONVERT_WINDOWS_PATHS=1 # If you need to change the sources (i.e. to China), set CHANGE_SOURCE to true CHANGE_SOURCE=false +# Set CHANGE_SOURCE and UBUNTU_SOURCE option if you want to change the Ubuntu system sources.list file. +UBUNTU_SOURCE=aliyun ### Docker Sync ########################################### diff --git a/workspace/Dockerfile b/workspace/Dockerfile index d38bb167..a997e080 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -36,13 +36,13 @@ ENV PUID ${PUID} ARG PGID=1000 ENV PGID ${PGID} +ARG CHANGE_SOURCE=false +ARG UBUNTU_SOURCE COPY ./sources.sh /tmp/sources.sh RUN if [ ${CHANGE_SOURCE} = true ]; then \ - chmod +x /tmp/sources.sh && \ - # bash /tmp/sources.sh aliyun - # ./tmp/sources.sh aliyun - /bin/bash /tmp/sources.sh aliyun && \ + /bin/sh -c /tmp/sources.sh ${UBUNTU_SOURCE} && \ + rm -rf /tmp/sources.sh \ ;fi # always run apt update when start and after add new source list, then clean up at end. diff --git a/workspace/sources.sh b/workspace/sources.sh deleted file mode 100755 index 61da3a24..00000000 --- a/workspace/sources.sh +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/bash - -if type "tee" 2>/dev/null && [ -n "$1" ]; then - SOURCE_PATH="/etc/apt/sources.list" - cp ${SOURCE_PATH} ${SOURCE_PATH}.bak && rm -rf ${SOURCE_PATH} - case "$1" in - "aliyun") - tee ${SOURCE_PATH} <<-'EOF' -deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse -deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse -deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse -deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse -deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse -deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse -deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse -deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse -deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse -deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse -EOF -;; - "zju") - tee ${SOURCE_PATH} <<-'EOF' -deb http://mirrors.zju.edu.cn/ubuntu/ bionic main multiverse restricted universe -deb http://mirrors.zju.edu.cn/ubuntu/ bionic-backports main multiverse restricted universe -deb http://mirrors.zju.edu.cn/ubuntu/ bionic-proposed main multiverse restricted universe -deb http://mirrors.zju.edu.cn/ubuntu/ bionic-security main multiverse restricted universe -deb http://mirrors.zju.edu.cn/ubuntu/ bionic-updates main multiverse restricted universe -deb-src http://mirrors.zju.edu.cn/ubuntu/ bionic main multiverse restricted universe -deb-src http://mirrors.zju.edu.cn/ubuntu/ bionic-backports main multiverse restricted universe -deb-src http://mirrors.zju.edu.cn/ubuntu/ bionic-proposed main multiverse restricted universe -deb-src http://mirrors.zju.edu.cn/ubuntu/ bionic-security main multiverse restricted universe -deb-src http://mirrors.zju.edu.cn/ubuntu/ bionic-updates main multiverse restricted universe -EOF -;; - "tsinghua") - tee ${SOURCE_PATH} <<-'EOF' -deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse -deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse -deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse -deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse -deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse -deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse -deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse -deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse -deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse -deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse -EOF -;; - "163") - tee ${SOURCE_PATH} <<-'EOF' -deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse -deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse -deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse -deb http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse -deb http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse -deb-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse -deb-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse -deb-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse -deb-src http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse -deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse -EOF -;; - "ustc") - tee ${SOURCE_PATH} <<-'EOF' -deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse -deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse -deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse -deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse -deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse -deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse -deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse -deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse -deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse -deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse -EOF -;; - *) - echo "Please check whether there is aliyun|zju|tsinghua|163|ustc in the parameter" - exit 1;; - esac -fi \ No newline at end of file From c64be9969fb957f95c55e4e83c995660fcaf7a0b Mon Sep 17 00:00:00 2001 From: alone <794000949@qq.com> Date: Sat, 30 Nov 2019 08:54:29 +0800 Subject: [PATCH 4/6] delete php-fpm args UBUNTU_SOURCE --- docker-compose.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index d1fde5c7..1e61eb4c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -158,7 +158,6 @@ services: context: ./php-fpm args: - CHANGE_SOURCE=${CHANGE_SOURCE} - - UBUNTU_SOURCE=${UBUNTU_SOURCE} - LARADOCK_PHP_VERSION=${PHP_VERSION} - LARADOCK_PHALCON_VERSION=${PHALCON_VERSION} - INSTALL_XDEBUG=${PHP_FPM_INSTALL_XDEBUG} From fe2631649cf23e18894101c6548d76f5cb025ee6 Mon Sep 17 00:00:00 2001 From: alone <794000949@qq.com> Date: Sat, 30 Nov 2019 09:06:09 +0800 Subject: [PATCH 5/6] add sources.sh for workspace --- workspace/sources.sh | 83 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100755 workspace/sources.sh diff --git a/workspace/sources.sh b/workspace/sources.sh new file mode 100755 index 00000000..eef06706 --- /dev/null +++ b/workspace/sources.sh @@ -0,0 +1,83 @@ +#!/bin/bash + +set -xe; + +if type "tee" 2>/dev/null && [ -n "${UBUNTU_SOURCE}" ]; then + SOURCE_PATH="/etc/apt/sources.list" + cp ${SOURCE_PATH} ${SOURCE_PATH}.bak && rm -rf ${SOURCE_PATH} + case "${UBUNTU_SOURCE}" in + "aliyun") + tee ${SOURCE_PATH} <<-'EOF' +deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse +deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse +deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse +deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse +deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse +deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse +deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse +deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse +deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse +deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse +EOF +;; + "zju") + tee ${SOURCE_PATH} <<-'EOF' +deb http://mirrors.zju.edu.cn/ubuntu/ bionic main multiverse restricted universe +deb http://mirrors.zju.edu.cn/ubuntu/ bionic-backports main multiverse restricted universe +deb http://mirrors.zju.edu.cn/ubuntu/ bionic-proposed main multiverse restricted universe +deb http://mirrors.zju.edu.cn/ubuntu/ bionic-security main multiverse restricted universe +deb http://mirrors.zju.edu.cn/ubuntu/ bionic-updates main multiverse restricted universe +deb-src http://mirrors.zju.edu.cn/ubuntu/ bionic main multiverse restricted universe +deb-src http://mirrors.zju.edu.cn/ubuntu/ bionic-backports main multiverse restricted universe +deb-src http://mirrors.zju.edu.cn/ubuntu/ bionic-proposed main multiverse restricted universe +deb-src http://mirrors.zju.edu.cn/ubuntu/ bionic-security main multiverse restricted universe +deb-src http://mirrors.zju.edu.cn/ubuntu/ bionic-updates main multiverse restricted universe +EOF +;; + "tsinghua") + tee ${SOURCE_PATH} <<-'EOF' +deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse +deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse +deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse +deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse +deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse +deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse +deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse +deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse +deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse +deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse +EOF +;; + "163") + tee ${SOURCE_PATH} <<-'EOF' +deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse +deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse +deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse +deb http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse +deb http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse +deb-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse +deb-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse +deb-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse +deb-src http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse +deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse +EOF +;; + "ustc") + tee ${SOURCE_PATH} <<-'EOF' +deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse +deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse +deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse +deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse +deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse +deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse +deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse +deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse +deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse +deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse +EOF +;; + *) + echo "Please check whether there is aliyun|zju|tsinghua|163|ustc in the parameter" + exit 1;; + esac +fi \ No newline at end of file From 497878557c9ed4663237e902ed12d63888638ef5 Mon Sep 17 00:00:00 2001 From: alone <794000949@qq.com> Date: Sun, 1 Dec 2019 00:02:59 +0800 Subject: [PATCH 6/6] Remove the sources.sh Ubuntu_Source parameter --- workspace/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workspace/Dockerfile b/workspace/Dockerfile index a997e080..f4514578 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -41,7 +41,7 @@ ARG UBUNTU_SOURCE COPY ./sources.sh /tmp/sources.sh RUN if [ ${CHANGE_SOURCE} = true ]; then \ - /bin/sh -c /tmp/sources.sh ${UBUNTU_SOURCE} && \ + /bin/sh -c /tmp/sources.sh && \ rm -rf /tmp/sources.sh \ ;fi