From 044bbc734b20dfec5794290ac187af5d07b92a99 Mon Sep 17 00:00:00 2001 From: Amor <794000949@qq.com> Date: Fri, 27 Aug 2021 17:23:22 +0800 Subject: [PATCH 1/7] remove source.sh & update nvm git address --- docker-compose.yml | 1 - workspace/Dockerfile | 10 ++---- workspace/sources.sh | 83 -------------------------------------------- 3 files changed, 3 insertions(+), 91 deletions(-) delete mode 100755 workspace/sources.sh diff --git a/docker-compose.yml b/docker-compose.yml index 5846dddd..4bd260d9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -66,7 +66,6 @@ services: - SHELL_OH_MY_ZSH=${SHELL_OH_MY_ZSH} - SHELL_OH_MY_ZSH_AUTOSUGESTIONS=${SHELL_OH_MY_ZSH_AUTOSUGESTIONS} - SHELL_OH_MY_ZSH_ALIASES=${SHELL_OH_MY_ZSH_ALIASES} - - UBUNTU_SOURCE=${UBUNTU_SOURCE} - BASE_IMAGE_TAG_PREFIX=${WORKSPACE_BASE_IMAGE_TAG_PREFIX} - LARADOCK_PHP_VERSION=${PHP_VERSION} - LARADOCK_PHALCON_VERSION=${PHALCON_VERSION} diff --git a/workspace/Dockerfile b/workspace/Dockerfile index c9c777c8..bfc6ac3d 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -31,17 +31,13 @@ USER root ########################################################################### ARG CHANGE_SOURCE=false -ARG UBUNTU_SOURCE=aliyun -COPY ./sources.sh /tmp/sources.sh RUN if [ ${CHANGE_SOURCE} = true ]; then \ # Change application source from deb.debian.org to aliyun source sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/' /etc/apt/sources.list; \ sed -i 's/security.debian.org/mirrors.tuna.tsinghua.edu.cn/' /etc/apt/sources.list; \ sed -i 's/security-cdn.debian.org/mirrors.tuna.tsinghua.edu.cn/' /etc/apt/sources.list; \ - chmod +x /tmp/sources.sh; \ - /bin/sh -c /tmp/sources.sh; \ - fi; \ - rm -rf /tmp/sources.sh + sed -i 's/archive.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list; \ + fi; ########################################################################### # Laradock non-root user: @@ -715,7 +711,7 @@ ENV NVM_NODEJS_ORG_MIRROR ${NVM_NODEJS_ORG_MIRROR} RUN if [ ${INSTALL_NODE} = true ]; then \ # Install nvm (A Node Version Manager) mkdir -p $NVM_DIR && \ - curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash \ + curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash \ && . $NVM_DIR/nvm.sh \ && nvm install ${NODE_VERSION} \ && nvm use ${NODE_VERSION} \ diff --git a/workspace/sources.sh b/workspace/sources.sh deleted file mode 100755 index 6ad796b6..00000000 --- a/workspace/sources.sh +++ /dev/null @@ -1,83 +0,0 @@ -#!/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/ focal main restricted universe multiverse -deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse -deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse -deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse -deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse -deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse -deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse -deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse -deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse -deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse -EOF -;; - "zju") - tee ${SOURCE_PATH} <<-'EOF' -deb http://mirrors.zju.edu.cn/ubuntu/ focal main multiverse restricted universe -deb http://mirrors.zju.edu.cn/ubuntu/ focal-backports main multiverse restricted universe -deb http://mirrors.zju.edu.cn/ubuntu/ focal-proposed main multiverse restricted universe -deb http://mirrors.zju.edu.cn/ubuntu/ focal-security main multiverse restricted universe -deb http://mirrors.zju.edu.cn/ubuntu/ focal-updates main multiverse restricted universe -deb-src http://mirrors.zju.edu.cn/ubuntu/ focal main multiverse restricted universe -deb-src http://mirrors.zju.edu.cn/ubuntu/ focal-backports main multiverse restricted universe -deb-src http://mirrors.zju.edu.cn/ubuntu/ focal-proposed main multiverse restricted universe -deb-src http://mirrors.zju.edu.cn/ubuntu/ focal-security main multiverse restricted universe -deb-src http://mirrors.zju.edu.cn/ubuntu/ focal-updates main multiverse restricted universe -EOF -;; - "tsinghua") - tee ${SOURCE_PATH} <<-'EOF' -deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse -deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse -deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse -deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse -deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse -deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse -deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse -deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse -deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse -deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse -EOF -;; - "163") - tee ${SOURCE_PATH} <<-'EOF' -deb http://mirrors.163.com/ubuntu/ focal main restricted universe multiverse -deb http://mirrors.163.com/ubuntu/ focal-security main restricted universe multiverse -deb http://mirrors.163.com/ubuntu/ focal-updates main restricted universe multiverse -deb http://mirrors.163.com/ubuntu/ focal-proposed main restricted universe multiverse -deb http://mirrors.163.com/ubuntu/ focal-backports main restricted universe multiverse -deb-src http://mirrors.163.com/ubuntu/ focal main restricted universe multiverse -deb-src http://mirrors.163.com/ubuntu/ focal-security main restricted universe multiverse -deb-src http://mirrors.163.com/ubuntu/ focal-updates main restricted universe multiverse -deb-src http://mirrors.163.com/ubuntu/ focal-proposed main restricted universe multiverse -deb-src http://mirrors.163.com/ubuntu/ focal-backports main restricted universe multiverse -EOF -;; - "ustc") - tee ${SOURCE_PATH} <<-'EOF' -deb https://mirrors.ustc.edu.cn/ubuntu/ focal main restricted universe multiverse -deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal main restricted universe multiverse -deb https://mirrors.ustc.edu.cn/ubuntu/ focal-updates main restricted universe multiverse -deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-updates main restricted universe multiverse -deb https://mirrors.ustc.edu.cn/ubuntu/ focal-backports main restricted universe multiverse -deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-backports main restricted universe multiverse -deb https://mirrors.ustc.edu.cn/ubuntu/ focal-security main restricted universe multiverse -deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-security main restricted universe multiverse -deb https://mirrors.ustc.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse -deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse -EOF -;; - *) - echo "Please check whether there is aliyun|zju|tsinghua|163|ustc in the parameter" - exit 1;; - esac -fi From 4bc5942ad58eeb0ae03581db265d5090ec0a01ce Mon Sep 17 00:00:00 2001 From: Amor <794000949@qq.com> Date: Fri, 27 Aug 2021 17:25:27 +0800 Subject: [PATCH 2/7] update ubuntu source --- php-fpm/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index 9da002c8..c86213ff 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -31,6 +31,7 @@ RUN if [ ${CHANGE_SOURCE} = true ]; then \ sed -i 's/deb.debian.org/mirrors.aliyun.com/' /etc/apt/sources.list && \ sed -i 's/security.debian.org/mirrors.aliyun.com/' /etc/apt/sources.list && \ sed -i 's/security-cdn.debian.org/mirrors.aliyun.com/' /etc/apt/sources.list \ + sed -i 's/archive.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list; \ ;fi # always run apt update when start and after add new source list, then clean up at end. From e11e9053edb28c0736fbb0e4d0353125627c2ec4 Mon Sep 17 00:00:00 2001 From: Amor <794000949@qq.com> Date: Fri, 27 Aug 2021 17:26:47 +0800 Subject: [PATCH 3/7] update ubuntu source --- php-fpm/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index c86213ff..b483bba4 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -30,8 +30,8 @@ RUN if [ ${CHANGE_SOURCE} = true ]; then \ # Change application source from deb.debian.org to aliyun source sed -i 's/deb.debian.org/mirrors.aliyun.com/' /etc/apt/sources.list && \ sed -i 's/security.debian.org/mirrors.aliyun.com/' /etc/apt/sources.list && \ - sed -i 's/security-cdn.debian.org/mirrors.aliyun.com/' /etc/apt/sources.list \ - sed -i 's/archive.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list; \ + sed -i 's/security-cdn.debian.org/mirrors.aliyun.com/' /etc/apt/sources.list && \ + sed -i 's/archive.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list \ ;fi # always run apt update when start and after add new source list, then clean up at end. From fa407d2b2fa1ddcf544b5cf5a93929d7a96677b0 Mon Sep 17 00:00:00 2001 From: Amor <794000949@qq.com> Date: Fri, 27 Aug 2021 17:32:40 +0800 Subject: [PATCH 4/7] update .env and README --- .env.example | 2 -- README-zh.md | 2 -- 2 files changed, 4 deletions(-) diff --git a/.env.example b/.env.example index 53db7ce1..8db7984c 100644 --- a/.env.example +++ b/.env.example @@ -74,8 +74,6 @@ 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 # Set ORACLE INSTANT_CLIENT_MIRROR option if you want to use Intranet improve download, you can download files first ORACLE_INSTANT_CLIENT_MIRROR=https://github.com/diogomascarenha/oracle-instantclient/raw/master/ diff --git a/README-zh.md b/README-zh.md index e519ef13..d05a7dbf 100644 --- a/README-zh.md +++ b/README-zh.md @@ -78,8 +78,6 @@ cp .env.example .env ``` # 开启ubuntu国内源 CHANGE_SOURCE=true -# 默认是阿里云,可选项有aliyun|zju|tsinghua|163|ustc -UBUNTU_SOURCE=aliyun # composer镜像源 WORKSPACE_COMPOSER_REPO_PACKAGIST=https://mirrors.aliyun.com/composer/ # nvm镜像源 From 53b5166236f501ed2218a8b097081f39992e9cb6 Mon Sep 17 00:00:00 2001 From: Amor <794000949@qq.com> Date: Mon, 30 Aug 2021 10:55:31 +0800 Subject: [PATCH 5/7] reset php-fpm/Dockerfile --- php-fpm/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index b483bba4..9da002c8 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -30,8 +30,7 @@ RUN if [ ${CHANGE_SOURCE} = true ]; then \ # Change application source from deb.debian.org to aliyun source sed -i 's/deb.debian.org/mirrors.aliyun.com/' /etc/apt/sources.list && \ sed -i 's/security.debian.org/mirrors.aliyun.com/' /etc/apt/sources.list && \ - sed -i 's/security-cdn.debian.org/mirrors.aliyun.com/' /etc/apt/sources.list && \ - sed -i 's/archive.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list \ + sed -i 's/security-cdn.debian.org/mirrors.aliyun.com/' /etc/apt/sources.list \ ;fi # always run apt update when start and after add new source list, then clean up at end. From d544a1a63c6962e17548a9301ced1666f44c7340 Mon Sep 17 00:00:00 2001 From: Amor <794000949@qq.com> Date: Mon, 30 Aug 2021 13:54:03 +0800 Subject: [PATCH 6/7] Remove workspace docker image redundant mirror links & Update php-fpm docker image link to Tsinghua University --- php-fpm/Dockerfile | 6 +++--- workspace/Dockerfile | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index 9da002c8..d36b59c3 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -28,9 +28,9 @@ ENV DEBIAN_FRONTEND noninteractive ARG CHANGE_SOURCE=false RUN if [ ${CHANGE_SOURCE} = true ]; then \ # Change application source from deb.debian.org to aliyun source - sed -i 's/deb.debian.org/mirrors.aliyun.com/' /etc/apt/sources.list && \ - sed -i 's/security.debian.org/mirrors.aliyun.com/' /etc/apt/sources.list && \ - sed -i 's/security-cdn.debian.org/mirrors.aliyun.com/' /etc/apt/sources.list \ + sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/' /etc/apt/sources.list && \ + sed -i 's/security.debian.org/mirrors.tuna.tsinghua.edu.cn/' /etc/apt/sources.list && \ + sed -i 's/security-cdn.debian.org/mirrors.tuna.tsinghua.edu.cn/' /etc/apt/sources.list \ ;fi # always run apt update when start and after add new source list, then clean up at end. diff --git a/workspace/Dockerfile b/workspace/Dockerfile index bfc6ac3d..e62296fc 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -33,9 +33,6 @@ USER root ARG CHANGE_SOURCE=false RUN if [ ${CHANGE_SOURCE} = true ]; then \ # Change application source from deb.debian.org to aliyun source - sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/' /etc/apt/sources.list; \ - sed -i 's/security.debian.org/mirrors.tuna.tsinghua.edu.cn/' /etc/apt/sources.list; \ - sed -i 's/security-cdn.debian.org/mirrors.tuna.tsinghua.edu.cn/' /etc/apt/sources.list; \ sed -i 's/archive.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list; \ fi; From 7298c60d0fe280e6a23445f0b3ed78bd4f074375 Mon Sep 17 00:00:00 2001 From: Amor <794000949@qq.com> Date: Mon, 30 Aug 2021 18:29:47 +0800 Subject: [PATCH 7/7] change workspace dockerfile mirror link --- workspace/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workspace/Dockerfile b/workspace/Dockerfile index e62296fc..1cf07f28 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -33,7 +33,7 @@ USER root ARG CHANGE_SOURCE=false RUN if [ ${CHANGE_SOURCE} = true ]; then \ # Change application source from deb.debian.org to aliyun source - sed -i 's/archive.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list; \ + sed -i 's/ports.ubuntu.com/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list; \ fi; ###########################################################################