remove source.sh & update nvm git address
This commit is contained in:
parent
910211ba2d
commit
044bbc734b
|
@ -66,7 +66,6 @@ services:
|
||||||
- SHELL_OH_MY_ZSH=${SHELL_OH_MY_ZSH}
|
- SHELL_OH_MY_ZSH=${SHELL_OH_MY_ZSH}
|
||||||
- SHELL_OH_MY_ZSH_AUTOSUGESTIONS=${SHELL_OH_MY_ZSH_AUTOSUGESTIONS}
|
- SHELL_OH_MY_ZSH_AUTOSUGESTIONS=${SHELL_OH_MY_ZSH_AUTOSUGESTIONS}
|
||||||
- SHELL_OH_MY_ZSH_ALIASES=${SHELL_OH_MY_ZSH_ALIASES}
|
- SHELL_OH_MY_ZSH_ALIASES=${SHELL_OH_MY_ZSH_ALIASES}
|
||||||
- UBUNTU_SOURCE=${UBUNTU_SOURCE}
|
|
||||||
- BASE_IMAGE_TAG_PREFIX=${WORKSPACE_BASE_IMAGE_TAG_PREFIX}
|
- BASE_IMAGE_TAG_PREFIX=${WORKSPACE_BASE_IMAGE_TAG_PREFIX}
|
||||||
- LARADOCK_PHP_VERSION=${PHP_VERSION}
|
- LARADOCK_PHP_VERSION=${PHP_VERSION}
|
||||||
- LARADOCK_PHALCON_VERSION=${PHALCON_VERSION}
|
- LARADOCK_PHALCON_VERSION=${PHALCON_VERSION}
|
||||||
|
|
|
@ -31,17 +31,13 @@ USER root
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
ARG CHANGE_SOURCE=false
|
ARG CHANGE_SOURCE=false
|
||||||
ARG UBUNTU_SOURCE=aliyun
|
|
||||||
COPY ./sources.sh /tmp/sources.sh
|
|
||||||
RUN if [ ${CHANGE_SOURCE} = true ]; then \
|
RUN if [ ${CHANGE_SOURCE} = true ]; then \
|
||||||
# Change application source from deb.debian.org to aliyun source
|
# 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/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.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/security-cdn.debian.org/mirrors.tuna.tsinghua.edu.cn/' /etc/apt/sources.list; \
|
||||||
chmod +x /tmp/sources.sh; \
|
sed -i 's/archive.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list; \
|
||||||
/bin/sh -c /tmp/sources.sh; \
|
fi;
|
||||||
fi; \
|
|
||||||
rm -rf /tmp/sources.sh
|
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
# Laradock non-root user:
|
# Laradock non-root user:
|
||||||
|
@ -715,7 +711,7 @@ ENV NVM_NODEJS_ORG_MIRROR ${NVM_NODEJS_ORG_MIRROR}
|
||||||
RUN if [ ${INSTALL_NODE} = true ]; then \
|
RUN if [ ${INSTALL_NODE} = true ]; then \
|
||||||
# Install nvm (A Node Version Manager)
|
# Install nvm (A Node Version Manager)
|
||||||
mkdir -p $NVM_DIR && \
|
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_DIR/nvm.sh \
|
||||||
&& nvm install ${NODE_VERSION} \
|
&& nvm install ${NODE_VERSION} \
|
||||||
&& nvm use ${NODE_VERSION} \
|
&& nvm use ${NODE_VERSION} \
|
||||||
|
|
|
@ -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
|
|
Loading…
Reference in New Issue