add ubuntu sources.list
This commit is contained in:
parent
b5314e5769
commit
24361ca818
@ -133,6 +133,8 @@ services:
|
|||||||
- http_proxy
|
- http_proxy
|
||||||
- https_proxy
|
- https_proxy
|
||||||
- no_proxy
|
- no_proxy
|
||||||
|
- CHANGE_SOURCE=${CHANGE_SOURCE}
|
||||||
|
- UBUNTU_SOURCE=${UBUNTU_SOURCE}
|
||||||
volumes:
|
volumes:
|
||||||
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
|
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
|
||||||
- ./php-worker/supervisord.d:/etc/supervisord.d
|
- ./php-worker/supervisord.d:/etc/supervisord.d
|
||||||
@ -156,6 +158,7 @@ services:
|
|||||||
context: ./php-fpm
|
context: ./php-fpm
|
||||||
args:
|
args:
|
||||||
- CHANGE_SOURCE=${CHANGE_SOURCE}
|
- CHANGE_SOURCE=${CHANGE_SOURCE}
|
||||||
|
- UBUNTU_SOURCE=${UBUNTU_SOURCE}
|
||||||
- LARADOCK_PHP_VERSION=${PHP_VERSION}
|
- LARADOCK_PHP_VERSION=${PHP_VERSION}
|
||||||
- LARADOCK_PHALCON_VERSION=${PHALCON_VERSION}
|
- LARADOCK_PHALCON_VERSION=${PHALCON_VERSION}
|
||||||
- INSTALL_XDEBUG=${PHP_FPM_INSTALL_XDEBUG}
|
- INSTALL_XDEBUG=${PHP_FPM_INSTALL_XDEBUG}
|
||||||
|
@ -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
|
# If you need to change the sources (i.e. to China), set CHANGE_SOURCE to true
|
||||||
CHANGE_SOURCE=false
|
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 ###########################################
|
### Docker Sync ###########################################
|
||||||
|
|
||||||
|
@ -36,13 +36,13 @@ ENV PUID ${PUID}
|
|||||||
ARG PGID=1000
|
ARG PGID=1000
|
||||||
ENV PGID ${PGID}
|
ENV PGID ${PGID}
|
||||||
|
|
||||||
|
ARG CHANGE_SOURCE=false
|
||||||
|
ARG UBUNTU_SOURCE
|
||||||
COPY ./sources.sh /tmp/sources.sh
|
COPY ./sources.sh /tmp/sources.sh
|
||||||
|
|
||||||
RUN if [ ${CHANGE_SOURCE} = true ]; then \
|
RUN if [ ${CHANGE_SOURCE} = true ]; then \
|
||||||
chmod +x /tmp/sources.sh && \
|
/bin/sh -c /tmp/sources.sh ${UBUNTU_SOURCE} && \
|
||||||
# bash /tmp/sources.sh aliyun
|
rm -rf /tmp/sources.sh \
|
||||||
# ./tmp/sources.sh aliyun
|
|
||||||
/bin/bash /tmp/sources.sh aliyun && \
|
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
# always run apt update when start and after add new source list, then clean up at end.
|
# always run apt update when start and after add new source list, then clean up at end.
|
||||||
|
@ -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
|
|
Loading…
Reference in New Issue
Block a user