From ee89ff96d5d2441bd65e227aeea82462a2eefdb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=9F=E5=8B=87?= Date: Tue, 4 Dec 2018 00:52:59 +0800 Subject: [PATCH 01/17] [U] ignore self-signed certificate --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 890c25c1..4235e773 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /.project .docker-sync /jenkins/jenkins_home +/nginx/ssl/ From 2de32fe97fb5edd36a0de199b8504bcd3877818c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=9F=E5=8B=87?= Date: Tue, 4 Dec 2018 01:35:21 +0800 Subject: [PATCH 02/17] [F] fix latest version for mysql8.0.13 --- mysql/my.cnf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql/my.cnf b/mysql/my.cnf index e03ccf88..399eaac2 100644 --- a/mysql/my.cnf +++ b/mysql/my.cnf @@ -7,4 +7,4 @@ [mysqld] sql-mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION" -character-set-server=utf8 +character-set-server=utf8mb4 From 28e82813c4bbc84547cfac1c91e21342dfeed588 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=9F=E5=8B=87?= Date: Tue, 4 Dec 2018 01:57:37 +0800 Subject: [PATCH 03/17] [F] fix mysql cann't start when version is 8.* --- docker-compose.yml | 1 + mysql/my.cnf | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 0c3ff899..2965a678 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -303,6 +303,7 @@ services: context: ./mysql args: - MYSQL_VERSION=${MYSQL_VERSION} + command: "--innodb_use_native_aio=0" environment: - MYSQL_DATABASE=${MYSQL_DATABASE} - MYSQL_USER=${MYSQL_USER} diff --git a/mysql/my.cnf b/mysql/my.cnf index 399eaac2..68578ef0 100644 --- a/mysql/my.cnf +++ b/mysql/my.cnf @@ -6,5 +6,5 @@ [mysql] [mysqld] -sql-mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION" +sql-mode="STRICT_TRANS_TABLES,NO_ZERO_DATE,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION" character-set-server=utf8mb4 From f64adc211430a668021833f53a14db978f71c04e Mon Sep 17 00:00:00 2001 From: mouyong Date: Fri, 9 Aug 2019 08:52:32 +0800 Subject: [PATCH 04/17] workspace and php-fpm change source --- docker-compose.yml | 5 +++++ mysql/my.cnf | 8 +++++++- .../sites/{default.conf => default.conf.example} | 0 php-fpm/Dockerfile | 10 ++++++++++ php-fpm/debian.sources.list | 8 ++++++++ php-fpm/xdebug.ini | 9 +++++++-- workspace/Dockerfile | 9 +++++++++ workspace/ubuntu.sources.list | 15 +++++++++++++++ workspace/xdebug.ini | 9 +++++++-- 9 files changed, 68 insertions(+), 5 deletions(-) rename nginx/sites/{default.conf => default.conf.example} (100%) create mode 100644 php-fpm/debian.sources.list create mode 100644 workspace/ubuntu.sources.list diff --git a/docker-compose.yml b/docker-compose.yml index 462b085d..2b9bff34 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -55,6 +55,7 @@ services: build: context: ./workspace args: + - CHANGE_SOURCE=${CHANGE_SOURCE} - LARADOCK_PHP_VERSION=${PHP_VERSION} - LARADOCK_PHALCON_VERSION=${PHALCON_VERSION} - INSTALL_SUBVERSION=${WORKSPACE_INSTALL_SUBVERSION} @@ -126,6 +127,7 @@ services: - no_proxy volumes: - ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG} + - "./workspace/crontab/laradock:/etc/cron.d/laradock" extra_hosts: - "dockerhost:${DOCKER_HOST_IP}" ports: @@ -145,6 +147,7 @@ services: build: context: ./php-fpm args: + - CHANGE_SOURCE=${CHANGE_SOURCE} - LARADOCK_PHP_VERSION=${PHP_VERSION} - LARADOCK_PHALCON_VERSION=${PHALCON_VERSION} - INSTALL_XDEBUG=${PHP_FPM_INSTALL_XDEBUG} @@ -200,6 +203,7 @@ services: - "9000" extra_hosts: - "dockerhost:${DOCKER_HOST_IP}" + dns: 114.114.114.114 environment: - PHP_IDE_CONFIG=${PHP_IDE_CONFIG} - DOCKER_HOST=tcp://docker-in-docker:2375 @@ -211,6 +215,7 @@ services: links: - docker-in-docker + ### PHP Worker ############################################ php-worker: build: diff --git a/mysql/my.cnf b/mysql/my.cnf index 68578ef0..a7facd5c 100644 --- a/mysql/my.cnf +++ b/mysql/my.cnf @@ -6,5 +6,11 @@ [mysql] [mysqld] -sql-mode="STRICT_TRANS_TABLES,NO_ZERO_DATE,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION" +sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ZERO_DATE,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION" character-set-server=utf8mb4 +skip-name-resolve +symbolic-links=0 +explicit_defaults_for_timestamp +default_authentication_plugin=mysql_native_password +#skip-grant-tables=1 + diff --git a/nginx/sites/default.conf b/nginx/sites/default.conf.example similarity index 100% rename from nginx/sites/default.conf rename to nginx/sites/default.conf.example diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index 68a1933e..183bd3cf 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -24,6 +24,16 @@ ARG LARADOCK_PHP_VERSION # Set Environment Variables ENV DEBIAN_FRONTEND noninteractive +# If you're in China, or you need to change sources, will be set CHANGE_SOURCE to true in .env. + +ADD debian.sources.list /etc/apt/debian.sources.list +ARG CHANGE_SOURCE=false +RUN if [ ${CHANGE_SOURCE} = true ]; then \ + mv /etc/apt/sources.list /etc/apt/sources.list.back && \ + mv /etc/apt/debian.sources.list /etc/apt/sources.list \ +;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/php-fpm/debian.sources.list b/php-fpm/debian.sources.list new file mode 100644 index 00000000..4cf49767 --- /dev/null +++ b/php-fpm/debian.sources.list @@ -0,0 +1,8 @@ +deb http://mirrors.aliyun.com/debian/ stretch main non-free contrib +deb-src http://mirrors.aliyun.com/debian/ stretch main non-free contrib +deb http://mirrors.aliyun.com/debian-security stretch/updates main +deb-src http://mirrors.aliyun.com/debian-security stretch/updates main +deb http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib +deb-src http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib +deb http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib +deb-src http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib \ No newline at end of file diff --git a/php-fpm/xdebug.ini b/php-fpm/xdebug.ini index c3f32ece..42a7c9b7 100644 --- a/php-fpm/xdebug.ini +++ b/php-fpm/xdebug.ini @@ -5,14 +5,19 @@ xdebug.remote_connect_back=1 xdebug.remote_port=9000 xdebug.idekey=PHPSTORM -xdebug.remote_autostart=0 +xdebug.remote_autostart=1 xdebug.remote_enable=0 -xdebug.cli_color=0 +xdebug.cli_color=1 xdebug.profiler_enable=0 xdebug.profiler_output_dir="~/xdebug/phpstorm/tmp/profiling" xdebug.remote_handler=dbgp xdebug.remote_mode=req +xdebug.remote_log=/var/log/php/xdebug_remote.log + +xdebug.auto_trace = 1 +xdebug.collect_params = 1 +xdebug.collect_return = 1 xdebug.var_display_max_children=-1 xdebug.var_display_max_data=-1 diff --git a/workspace/Dockerfile b/workspace/Dockerfile index cbbeb2e9..fa2ea64c 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -24,6 +24,15 @@ ARG LARADOCK_PHP_VERSION # Set Environment Variables ENV DEBIAN_FRONTEND noninteractive +# If you're in China, or you need to change sources, will be set CHANGE_SOURCE to true in .env. + +ADD ubuntu.sources.list /etc/apt/ubuntu.sources.list +ARG CHANGE_SOURCE=false +RUN if [ ${CHANGE_SOURCE} = true ]; then \ + mv /etc/apt/sources.list /etc/apt/sources.list.back && \ + mv /etc/apt/ubuntu.sources.list /etc/apt/sources.list \ +;fi + # Start as root USER root diff --git a/workspace/ubuntu.sources.list b/workspace/ubuntu.sources.list new file mode 100644 index 00000000..6edaa130 --- /dev/null +++ b/workspace/ubuntu.sources.list @@ -0,0 +1,15 @@ +deb http://mirrors.aliyun.com/ubuntu/ xenial main +deb-src http://mirrors.aliyun.com/ubuntu/ xenial main + +deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main +deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main + +deb http://mirrors.aliyun.com/ubuntu/ xenial universe +deb-src http://mirrors.aliyun.com/ubuntu/ xenial universe +deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe +deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates universe + +deb http://mirrors.aliyun.com/ubuntu/ xenial-security main +deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main +deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe +deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security universe \ No newline at end of file diff --git a/workspace/xdebug.ini b/workspace/xdebug.ini index c3f32ece..42a7c9b7 100644 --- a/workspace/xdebug.ini +++ b/workspace/xdebug.ini @@ -5,14 +5,19 @@ xdebug.remote_connect_back=1 xdebug.remote_port=9000 xdebug.idekey=PHPSTORM -xdebug.remote_autostart=0 +xdebug.remote_autostart=1 xdebug.remote_enable=0 -xdebug.cli_color=0 +xdebug.cli_color=1 xdebug.profiler_enable=0 xdebug.profiler_output_dir="~/xdebug/phpstorm/tmp/profiling" xdebug.remote_handler=dbgp xdebug.remote_mode=req +xdebug.remote_log=/var/log/php/xdebug_remote.log + +xdebug.auto_trace = 1 +xdebug.collect_params = 1 +xdebug.collect_return = 1 xdebug.var_display_max_children=-1 xdebug.var_display_max_data=-1 From f01cab7742eca0c4fbc7a3e9afc11acabcb903d0 Mon Sep 17 00:00:00 2001 From: mouyong Date: Fri, 9 Aug 2019 09:08:49 +0800 Subject: [PATCH 05/17] set xdebug.remote_autostart=0 https://github.com/laradock/laradock/issues/2112#issuecomment-489603086 --- php-fpm/xdebug.ini | 2 +- workspace/xdebug.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/php-fpm/xdebug.ini b/php-fpm/xdebug.ini index 42a7c9b7..1fef0580 100644 --- a/php-fpm/xdebug.ini +++ b/php-fpm/xdebug.ini @@ -5,7 +5,7 @@ xdebug.remote_connect_back=1 xdebug.remote_port=9000 xdebug.idekey=PHPSTORM -xdebug.remote_autostart=1 +xdebug.remote_autostart=0 xdebug.remote_enable=0 xdebug.cli_color=1 xdebug.profiler_enable=0 diff --git a/workspace/xdebug.ini b/workspace/xdebug.ini index 42a7c9b7..1fef0580 100644 --- a/workspace/xdebug.ini +++ b/workspace/xdebug.ini @@ -5,7 +5,7 @@ xdebug.remote_connect_back=1 xdebug.remote_port=9000 xdebug.idekey=PHPSTORM -xdebug.remote_autostart=1 +xdebug.remote_autostart=0 xdebug.remote_enable=0 xdebug.cli_color=1 xdebug.profiler_enable=0 From 48933479809a318cb17bed7742655f65da4aac03 Mon Sep 17 00:00:00 2001 From: mouyong Date: Fri, 9 Aug 2019 09:14:10 +0800 Subject: [PATCH 06/17] remove setting remote_log --- php-fpm/xdebug.ini | 3 +-- workspace/xdebug.ini | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/php-fpm/xdebug.ini b/php-fpm/xdebug.ini index 1fef0580..9bc6578f 100644 --- a/php-fpm/xdebug.ini +++ b/php-fpm/xdebug.ini @@ -6,14 +6,13 @@ xdebug.remote_port=9000 xdebug.idekey=PHPSTORM xdebug.remote_autostart=0 -xdebug.remote_enable=0 +xdebug.remote_enable=1 xdebug.cli_color=1 xdebug.profiler_enable=0 xdebug.profiler_output_dir="~/xdebug/phpstorm/tmp/profiling" xdebug.remote_handler=dbgp xdebug.remote_mode=req -xdebug.remote_log=/var/log/php/xdebug_remote.log xdebug.auto_trace = 1 xdebug.collect_params = 1 diff --git a/workspace/xdebug.ini b/workspace/xdebug.ini index 1fef0580..9bc6578f 100644 --- a/workspace/xdebug.ini +++ b/workspace/xdebug.ini @@ -6,14 +6,13 @@ xdebug.remote_port=9000 xdebug.idekey=PHPSTORM xdebug.remote_autostart=0 -xdebug.remote_enable=0 +xdebug.remote_enable=1 xdebug.cli_color=1 xdebug.profiler_enable=0 xdebug.profiler_output_dir="~/xdebug/phpstorm/tmp/profiling" xdebug.remote_handler=dbgp xdebug.remote_mode=req -xdebug.remote_log=/var/log/php/xdebug_remote.log xdebug.auto_trace = 1 xdebug.collect_params = 1 From b8a971e634275bd290bc6f880e39f54f3344e1fd Mon Sep 17 00:00:00 2001 From: mouyong Date: Fri, 9 Aug 2019 09:26:40 +0800 Subject: [PATCH 07/17] fix in aliyun mirrors, hash check error. --- php-fpm/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index 183bd3cf..d5aba61d 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -574,7 +574,7 @@ USER root ARG INSTALL_IMAGEMAGICK=false RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \ - apt-get install -y libmagickwand-dev imagemagick && \ + apt-get install -f -y libmagickwand-dev imagemagick && \ pecl install imagick && \ docker-php-ext-enable imagick \ ;fi From ab3a325ea3396fe95175986ab33290a630822cdf Mon Sep 17 00:00:00 2001 From: mouyong Date: Fri, 9 Aug 2019 13:11:03 +0800 Subject: [PATCH 08/17] fix apt install fail --- php-fpm/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index d5aba61d..3b0b6007 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -574,7 +574,7 @@ USER root ARG INSTALL_IMAGEMAGICK=false RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \ - apt-get install -f -y libmagickwand-dev imagemagick && \ + apt-get install --fix-missing -y libmagickwand-dev imagemagick && \ pecl install imagick && \ docker-php-ext-enable imagick \ ;fi From b6204e5933e8a7173ce143432fe20fe8150e034a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=9F=E5=8B=87?= Date: Thu, 5 Dec 2019 11:16:32 +0800 Subject: [PATCH 09/17] pref: add change source flag --- docker-compose.yml | 4 +++- laravel-horizon/Dockerfile | 10 +++++++++- php-worker/Dockerfile | 8 ++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index b0b297c7..acbe2264 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -234,6 +234,7 @@ services: build: context: ./php-worker args: + - CHANGE_SOURCE=${CHANGE_SOURCE} - PHP_VERSION=${PHP_VERSION} - PHALCON_VERSION=${PHALCON_VERSION} - INSTALL_PGSQL=${PHP_WORKER_INSTALL_PGSQL} @@ -267,6 +268,7 @@ services: build: context: ./laravel-horizon args: + - CHANGE_SOURCE=${CHANGE_SOURCE} - PHP_VERSION=${PHP_VERSION} - INSTALL_PGSQL=${PHP_FPM_INSTALL_PGSQL} - INSTALL_BCMATH=${PHP_FPM_INSTALL_BCMATH} @@ -290,9 +292,9 @@ services: build: context: ./nginx args: + - CHANGE_SOURCE=${CHANGE_SOURCE} - PHP_UPSTREAM_CONTAINER=${NGINX_PHP_UPSTREAM_CONTAINER} - PHP_UPSTREAM_PORT=${NGINX_PHP_UPSTREAM_PORT} - - CHANGE_SOURCE=${CHANGE_SOURCE} - http_proxy - https_proxy - no_proxy diff --git a/laravel-horizon/Dockerfile b/laravel-horizon/Dockerfile index 425499d6..9edbe14b 100644 --- a/laravel-horizon/Dockerfile +++ b/laravel-horizon/Dockerfile @@ -9,6 +9,14 @@ FROM php:${PHP_VERSION}-alpine LABEL maintainer="Mahmoud Zalt " +# If you're in China, or you need to change sources, will be set CHANGE_SOURCE to true in .env. + +ARG CHANGE_SOURCE=false +RUN if [ ${CHANGE_SOURCE} = true ]; then \ + # Change application source from dl-cdn.alpinelinux.org to aliyun source + sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/' /etc/apk/repositories \ +;fi + RUN apk --update add wget \ curl \ git \ @@ -50,7 +58,7 @@ ARG INSTALL_CASSANDRA=false RUN if [ ${INSTALL_CASSANDRA} = true ]; then \ apk --update add cassandra-cpp-driver \ ;fi - + # Install PhpRedis package: ARG INSTALL_PHPREDIS=false RUN if [ ${INSTALL_PHPREDIS} = true ]; then \ diff --git a/php-worker/Dockerfile b/php-worker/Dockerfile index 9bccca0e..350c40dc 100644 --- a/php-worker/Dockerfile +++ b/php-worker/Dockerfile @@ -9,6 +9,14 @@ FROM php:${PHP_VERSION}-alpine LABEL maintainer="Mahmoud Zalt " +# If you're in China, or you need to change sources, will be set CHANGE_SOURCE to true in .env. + +ARG CHANGE_SOURCE=false +RUN if [ ${CHANGE_SOURCE} = true ]; then \ + # Change application source from dl-cdn.alpinelinux.org to aliyun source + sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/' /etc/apk/repositories \ +;fi + RUN apk --update add wget \ curl \ git \ From 5a0c9054571ba69a6b5ba3cc777234295a6133ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=9F=E5=8B=87?= Date: Thu, 5 Dec 2019 11:23:51 +0800 Subject: [PATCH 10/17] feat: change source --- docker-compose.yml | 3 --- php-fpm/xdebug.ini | 2 +- workspace/Dockerfile | 7 ++++--- workspace/ubuntu.sources.list | 15 --------------- 4 files changed, 5 insertions(+), 22 deletions(-) delete mode 100644 workspace/ubuntu.sources.list diff --git a/docker-compose.yml b/docker-compose.yml index acbe2264..d5de70b8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -216,7 +216,6 @@ services: - "9000" extra_hosts: - "dockerhost:${DOCKER_HOST_IP}" - dns: 114.114.114.114 environment: - PHP_IDE_CONFIG=${PHP_IDE_CONFIG} - DOCKER_HOST=tcp://docker-in-docker:2375 @@ -228,7 +227,6 @@ services: links: - docker-in-docker - ### PHP Worker ############################################ php-worker: build: @@ -379,7 +377,6 @@ services: context: ./mysql args: - MYSQL_VERSION=${MYSQL_VERSION} - command: "--innodb_use_native_aio=0" environment: - MYSQL_DATABASE=${MYSQL_DATABASE} - MYSQL_USER=${MYSQL_USER} diff --git a/php-fpm/xdebug.ini b/php-fpm/xdebug.ini index 9bc6578f..8560f98b 100644 --- a/php-fpm/xdebug.ini +++ b/php-fpm/xdebug.ini @@ -6,7 +6,7 @@ xdebug.remote_port=9000 xdebug.idekey=PHPSTORM xdebug.remote_autostart=0 -xdebug.remote_enable=1 +xdebug.remote_enable=0 xdebug.cli_color=1 xdebug.profiler_enable=0 xdebug.profiler_output_dir="~/xdebug/phpstorm/tmp/profiling" diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 70b5ab40..18eb306a 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -25,11 +25,12 @@ ENV DEBIAN_FRONTEND noninteractive # If you're in China, or you need to change sources, will be set CHANGE_SOURCE to true in .env. -ADD ubuntu.sources.list /etc/apt/ubuntu.sources.list ARG CHANGE_SOURCE=false RUN if [ ${CHANGE_SOURCE} = true ]; then \ - mv /etc/apt/sources.list /etc/apt/sources.list.back && \ - mv /etc/apt/ubuntu.sources.list /etc/apt/sources.list \ + # 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 \ ;fi # Start as root diff --git a/workspace/ubuntu.sources.list b/workspace/ubuntu.sources.list deleted file mode 100644 index 6edaa130..00000000 --- a/workspace/ubuntu.sources.list +++ /dev/null @@ -1,15 +0,0 @@ -deb http://mirrors.aliyun.com/ubuntu/ xenial main -deb-src http://mirrors.aliyun.com/ubuntu/ xenial main - -deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main -deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main - -deb http://mirrors.aliyun.com/ubuntu/ xenial universe -deb-src http://mirrors.aliyun.com/ubuntu/ xenial universe -deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe -deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates universe - -deb http://mirrors.aliyun.com/ubuntu/ xenial-security main -deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main -deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe -deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security universe \ No newline at end of file From dab5ff1ac6a41818a2d3df2ea1e0af4c470b8efe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=9F=E5=8B=87?= Date: Thu, 5 Dec 2019 11:26:01 +0800 Subject: [PATCH 11/17] feat: restore mysql/my.cnf --- mysql/my.cnf | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/mysql/my.cnf b/mysql/my.cnf index a7facd5c..e03ccf88 100644 --- a/mysql/my.cnf +++ b/mysql/my.cnf @@ -6,11 +6,5 @@ [mysql] [mysqld] -sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ZERO_DATE,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION" -character-set-server=utf8mb4 -skip-name-resolve -symbolic-links=0 -explicit_defaults_for_timestamp -default_authentication_plugin=mysql_native_password -#skip-grant-tables=1 - +sql-mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION" +character-set-server=utf8 From 2c9563d2cdf35b441a1e75f159ca3e18d928b57b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=9F=E5=8B=87?= Date: Thu, 5 Dec 2019 11:27:44 +0800 Subject: [PATCH 12/17] feat: restore some file --- php-fpm/Dockerfile | 2 +- workspace/xdebug.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index 789bbadc..73e55a96 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -590,7 +590,7 @@ USER root ARG INSTALL_IMAGEMAGICK=false RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \ - apt-get install --fix-missing -y libmagickwand-dev imagemagick && \ + apt-get install -y libmagickwand-dev imagemagick && \ pecl install imagick && \ docker-php-ext-enable imagick \ ;fi diff --git a/workspace/xdebug.ini b/workspace/xdebug.ini index 9bc6578f..8560f98b 100644 --- a/workspace/xdebug.ini +++ b/workspace/xdebug.ini @@ -6,7 +6,7 @@ xdebug.remote_port=9000 xdebug.idekey=PHPSTORM xdebug.remote_autostart=0 -xdebug.remote_enable=1 +xdebug.remote_enable=0 xdebug.cli_color=1 xdebug.profiler_enable=0 xdebug.profiler_output_dir="~/xdebug/phpstorm/tmp/profiling" From c84db7d4d7cdab1639fa6944fda2b0b8609a3c0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=9F=E5=8B=87?= Date: Thu, 5 Dec 2019 11:48:27 +0800 Subject: [PATCH 13/17] fix: fix the extension cannot install problem. --- php-fpm/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index 73e55a96..f1e66c71 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -590,7 +590,7 @@ USER root ARG INSTALL_IMAGEMAGICK=false RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \ - apt-get install -y libmagickwand-dev imagemagick && \ + apt-get install -y --fix-missing libmagickwand-dev imagemagick && \ pecl install imagick && \ docker-php-ext-enable imagick \ ;fi From 9bdeaa3682976d61f3a66f50b5fa4e6e19d5f80f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=9F=E5=8B=87?= Date: Thu, 5 Dec 2019 13:21:10 +0800 Subject: [PATCH 14/17] fix: fix cannot install imagemagick extension problem --- php-fpm/Dockerfile | 6 +++--- workspace/Dockerfile | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index f1e66c71..3e4bac25 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 18eb306a..ca34a561 100644 --- a/workspace/Dockerfile +++ b/workspace/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 # Start as root From 838156b1bdede7519e79a85fd077305f3b9d16fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=9F=E5=8B=87?= Date: Thu, 5 Dec 2019 13:28:42 +0800 Subject: [PATCH 15/17] refactor: remove some option --- php-fpm/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index 3e4bac25..8dfa9f15 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -590,7 +590,7 @@ USER root ARG INSTALL_IMAGEMAGICK=false RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \ - apt-get install -y --fix-missing libmagickwand-dev imagemagick && \ + apt-get install -y libmagickwand-dev imagemagick && \ pecl install imagick && \ docker-php-ext-enable imagick \ ;fi From 84db9b079d9c28c2cc6a3456b7d2000b8f500008 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=9F=E5=8B=87?= Date: Fri, 6 Dec 2019 09:30:11 +0800 Subject: [PATCH 16/17] =?UTF-8?q?refactor:=20=E8=BF=98=E5=8E=9F=20xdebug.i?= =?UTF-8?q?ni?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- php-fpm/xdebug.ini | 6 +----- workspace/xdebug.ini | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/php-fpm/xdebug.ini b/php-fpm/xdebug.ini index 8560f98b..c3f32ece 100644 --- a/php-fpm/xdebug.ini +++ b/php-fpm/xdebug.ini @@ -7,17 +7,13 @@ xdebug.idekey=PHPSTORM xdebug.remote_autostart=0 xdebug.remote_enable=0 -xdebug.cli_color=1 +xdebug.cli_color=0 xdebug.profiler_enable=0 xdebug.profiler_output_dir="~/xdebug/phpstorm/tmp/profiling" xdebug.remote_handler=dbgp xdebug.remote_mode=req -xdebug.auto_trace = 1 -xdebug.collect_params = 1 -xdebug.collect_return = 1 - xdebug.var_display_max_children=-1 xdebug.var_display_max_data=-1 xdebug.var_display_max_depth=-1 diff --git a/workspace/xdebug.ini b/workspace/xdebug.ini index 8560f98b..c3f32ece 100644 --- a/workspace/xdebug.ini +++ b/workspace/xdebug.ini @@ -7,17 +7,13 @@ xdebug.idekey=PHPSTORM xdebug.remote_autostart=0 xdebug.remote_enable=0 -xdebug.cli_color=1 +xdebug.cli_color=0 xdebug.profiler_enable=0 xdebug.profiler_output_dir="~/xdebug/phpstorm/tmp/profiling" xdebug.remote_handler=dbgp xdebug.remote_mode=req -xdebug.auto_trace = 1 -xdebug.collect_params = 1 -xdebug.collect_return = 1 - xdebug.var_display_max_children=-1 xdebug.var_display_max_data=-1 xdebug.var_display_max_depth=-1 From f3e3bbe2b75993e309cac4454cb542de16db0716 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=9F=E5=8B=87?= Date: Fri, 6 Dec 2019 09:35:10 +0800 Subject: [PATCH 17/17] =?UTF-8?q?refactor:=20=E8=BF=98=E5=8E=9F=20nginx.co?= =?UTF-8?q?nf=20=E6=96=87=E4=BB=B6=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nginx/sites/{default.conf.example => default.conf} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename nginx/sites/{default.conf.example => default.conf} (100%) diff --git a/nginx/sites/default.conf.example b/nginx/sites/default.conf similarity index 100% rename from nginx/sites/default.conf.example rename to nginx/sites/default.conf