yeszao / dnmp Goto Github PK
View Code? Open in Web Editor NEWDocker LNMP (Nginx, PHP7/PHP5, MySQL, Redis)
Home Page: https://resumis.com
License: MIT License
Docker LNMP (Nginx, PHP7/PHP5, MySQL, Redis)
Home Page: https://resumis.com
License: MIT License
nmp-nginx | 2018/05/31 03:15:20 [emerg] 1#1: open() "/etc/nginx/nginx.conf" failed (13: Permission denied)
dnmp-nginx | nginx: [emerg] open() "/etc/nginx/nginx.conf" failed (13: Permission denied)
dnmp-nginx exited with code 1,
在最开始wordpress安装的时候,要填写MySQL的连接,你的文章提到不能使用localhost,我使用了主机的ip,但好像也是不能通过?
我window 的虚拟机里面装docker 部署好项目使用php的curl会报这个错误怎么解决呢?
cURL error 6: Could not resolve host
mysql -h 127.0.0.1 -u root -p
照你的教程,mysql连接不上。
ERROR 1130 (HY000): Host '192.168.0.1' is not allowed to connect to this MySQL server
报这个错
Notice: Undefined variable: proxy_host in PEAR/Proxy.php on line 163
Notice: Undefined variable: proxy_port in PEAR/Proxy.php on line 163
No releases available for package "pecl.php.net/redis"
install failed
ERROR: Service 'php72' failed to build: The command '/bin/sh -c pecl install redis-3.1.4 && docker-php-ext-enable redis && : && pecl install xdebug-2.6.0alpha1 && docker-php-ext-enable xdebug && : && apt-get install -y libmagickwand-dev && pecl install imagick-3.4.3 && docker-php-ext-enable imagick && : && apt-get install -y libmemcached-dev zlib1g-dev && pecl install memcached-3.0.4 && docker-php-ext-enable memcached' returned a non-zero code: 1
版本不对?
dockerFile中 已安装mcrypt 为什么phpinfo中没有该扩展
Lines 12 to 14 in 1947659
Linux Mint 18.2 基于 ubuntu 16 会报 Invalid service name "php-fpm" - only [a-zA-Z0-9] are allowed
的错误。
修改为 phpfpm
就行了
how to modify the dockerfile to fix it to the centos,because centos use yum to manage package
Starting dnmpmaster_mysql_1 ... error
ERROR: for dnmpmaster_mysql_1 Cannot start service mysql: driver failed programming external connectivity on endpoint dnmpmaster_mysql_1 (90a3b65a3bc834302577dbd1481ba35680240074b84261cf41daee6c10ff5ffc)Starting dnmpmaster_redis_1 ... error
ERROR: for dnmpmaster_redis_1 Cannot start service redis: driver failed programming external connectivity on endpoint dnmpmaster_redis_1 (f2fa9226f903c64a5d3025f3ab9787b10f946069e726fd77332fcf7bb4d3b84f): Error starting userland proxy: listen tcp 0.0.0.0:6379: bind: address already in use
ERROR: for redis Cannot start service redis: driver failed programming external connectivity on endpoint dnmpmaster_redis_1 (f2fa9226f903c64a5d3025f3ab9787b10f946069e726fd77332fcf7bb4d3b84f): Error starting userland proxy: listen tcp 0.0.0.0:6379: bind: address already in use
ERROR: for mysql Cannot start service mysql: driver failed programming external connectivity on endpoint dnmpmaster_mysql_1 (90a3b65a3bc834302577dbd1481ba35680240074b84261cf41daee6c10ff5ffc): Error starting userland proxy: listen tcp 0.0.0.0:3306: bind: address already in use
ERROR: Encountered errors while bringing up the project.
这是什么原因曹成的呢?
监听端口被占用了?
解除注释docker-php-ext-install oci8和docker-php-ext-install pdo_oci后提示需要oracle instant client,请问如何添加这个客户端?
大神,求教
php72:
build: ./php/php72/
ports:
- "9072:9072"
expose:
- "9072"
volumes:
- ./www/:/var/www/html/:rw
- ./conf/php72/php.ini:/usr/local/etc/php/php.ini:ro
- ./conf/php72/php-fpm.d/www.conf:/usr/local/etc/php-fpm.d/www.conf:rw
- ./log/php-fpm-72/:/var/log/php-fpm/:rw
links:
- mysql:mysql
php56:
build: ./php/php56/
ports:
- "9056:9056"
expose:
- "9056"
volumes:
- ./www/:/var/www/html/:rw
- ./conf/php56/php.ini:/usr/local/etc/php/php.ini:ro
- ./conf/php56/php-fpm.d/www.conf:/usr/local/etc/php-fpm.d/www.conf:rw
- ./log/php-fpm-56/:/var/log/php-fpm/:rw
links:
- mysql:mysql
mysql用户名密码是多少?没有按照phpadmin
Notice: Undefined variable: proxy_port in PEAR/Proxy.php on line 163
No releases available for package "pecl.php.net/redis"
install failed
ERROR: Service 'php72' failed to build: The command '/bin/sh -c pecl install redis-3.1.4 && docker-php-ext-enable redis && : && pecl install xdebug-2.6.0alpha1 && docker-php-ext-enable xdebug && : && apt-get install -y libmagickwand-dev && pecl install imagick-3.4.3 && docker-php-ext-enable imagick && : && apt-get install -y libmemcached-dev zlib1g-dev && pecl install memcached-3.0.4 && docker-php-ext-enable memcached' returned a non-zero code: 1
很感谢作者的提供。。。最近也在一直学习和研究dockerfile。作者的事例能用在正式项目的生产环境吗?我们有一些项目,是用java开发的。。也需要一个这个的环境。。。望作者能给好的建议。。
感谢作者,部署方便了很多!
在phpmyadmin上操作MySQL很慢很卡,部署了套WP后直接经常性崩溃。
服务器8H4G的,调了下cnf不知道能不能好用。先发个issue ;)
`2018-08-19T06:04:42.498788Z 0 [ERROR] [MY-000000] [InnoDB] InnoDB: Assertion failure: log0write.cc:1799:time_elapsed >= 0
InnoDB: thread 140610028599040
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/8.0/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
06:04:42 UTC - mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
Attempting to collect some information that could help diagnose the problem.
As this is a crash and something is definitely wrong, the information
collection process might fail.
key_buffer_size=8388608
read_buffer_size=131072
max_used_connections=5
max_threads=151
thread_count=1
connection_count=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 67846 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0 thread_stack 0x46000
/usr/sbin/mysqld(my_print_stacktrace(unsigned char*, unsigned long)+0x2e) [0x56307900126e]
/usr/sbin/mysqld(handle_fatal_signal+0x4c1) [0x5630782dce21]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x110c0) [0x7fe2837fe0c0]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcf) [0x7fe281a93fff]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x16a) [0x7fe281a9542a]
/usr/sbin/mysqld(ut_dbg_assertion_failed(char const*, char const*, unsigned long)+0xc3) [0x563079293ef3]
/usr/sbin/mysqld(+0x1bc0818) [0x56307916d818]
/usr/sbin/mysqld(log_flusher(log_t*)+0x2bf) [0x56307916e34f]
/usr/sbin/mysqld(std::thread::_State_impl<std::_Bind_simple<Runnable (void ()(log_t), log_t*)> >::_M_run()+0x68) [0x5630791550d8]
/usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb9e6f) [0x7fe2823d4e6f]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7494) [0x7fe2837f4494]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7fe281b49acf]
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
2018-08-19T06:12:34.883293Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.
2018-08-19T06:12:34.883483Z 0 [Warning] [MY-010915] [Server] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2018-08-19T06:12:34.883591Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.12) starting as process 1
mbind: Operation not permitted
mbind: Operation not permitted
mbind: Operation not permitted
mbind: Operation not permitted
mbind: Operation not permitted
mbind: Operation not permitted
mbind: Operation not permitted
mbind: Operation not permitted
2018-08-19T06:12:36.246280Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2018-08-19T06:12:36.277520Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
2018-08-19T06:12:36.299629Z 0 [Warning] [MY-010315] [Server] 'user' entry 'mysql.infoschema@localhost' ignored in --skip-name-resolve mode.
2018-08-19T06:12:36.299710Z 0 [Warning] [MY-010315] [Server] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.
2018-08-19T06:12:36.299759Z 0 [Warning] [MY-010315] [Server] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
2018-08-19T06:12:36.299862Z 0 [Warning] [MY-010315] [Server] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
2018-08-19T06:12:36.299931Z 0 [Warning] [MY-010323] [Server] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.
2018-08-19T06:12:36.299961Z 0 [Warning] [MY-010323] [Server] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
2018-08-19T06:12:36.300004Z 0 [Warning] [MY-010311] [Server] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
2018-08-19T06:12:36.328943Z 0 [Warning] [MY-010330] [Server] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.
2018-08-19T06:12:36.329031Z 0 [Warning] [MY-010330] [Server] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
2018-08-19T06:12:36.341294Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.12' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL.
mbind: Operation not permitted
mbind: Operation not permitted
mbind: Operation not permitted
mbind: Operation not permitted
2018-08-19T08:44:43.975551Z 0 [ERROR] [MY-000000] [InnoDB] InnoDB: Assertion failure: log0write.cc:1799:time_elapsed >= 0
InnoDB: thread 140296915425024
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/8.0/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
08:44:43 UTC - mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
Attempting to collect some information that could help diagnose the problem.
As this is a crash and something is definitely wrong, the information
collection process might fail.
key_buffer_size=8388608
read_buffer_size=131072
max_used_connections=4
max_threads=151
thread_count=3
connection_count=2
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 67846 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0 thread_stack 0x46000
/usr/sbin/mysqld(my_print_stacktrace(unsigned char*, unsigned long)+0x2e) [0x562f6fdd526e]
/usr/sbin/mysqld(handle_fatal_signal+0x4c1) [0x562f6f0b0e21]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x110c0) [0x7f999c3d60c0]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcf) [0x7f999a66bfff]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x16a) [0x7f999a66d42a]
/usr/sbin/mysqld(ut_dbg_assertion_failed(char const*, char const*, unsigned long)+0xc3) [0x562f70067ef3]
/usr/sbin/mysqld(+0x1bc0818) [0x562f6ff41818]
/usr/sbin/mysqld(log_flusher(log_t*)+0x2bf) [0x562f6ff4234f]
/usr/sbin/mysqld(std::thread::_State_impl<std::_Bind_simple<Runnable (void ()(log_t), log_t*)> >::_M_run()+0x68) [0x562f6ff290d8]
/usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb9e6f) [0x7f999aface6f]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7494) [0x7f999c3cc494]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7f999a721acf]
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.`
We need create a soft link for gmp.h, such as line 2 following:
&& apt-get install -y libgmp-dev \
&& ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h \
&& docker-php-ext-install gmp \
请问一下,为什么使用 fopen(url) 的时候报错: failed to open stream: Connection refused。
情况是这样的,我通过docker 搭建的环境,有一个api接口,然后前端访问api的时候直接报这个错,但是我把接口地址改成在线地址,却没有报错。
Removing intermediate container 5af2ac77fd76
Step 3 : RUN apt-get update && apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && docker-php-ext-install gd && : && apt-get install -y libicu-dev && docker-php-ext-install intl && : && apt-get install -y libxml2-dev && apt-get install -y libxslt-dev && docker-php-ext-install soap && docker-php-ext-install xsl && docker-php-ext-install xmlrpc && docker-php-ext-install wddx && : && apt-get install -y libbz2-dev && docker-php-ext-install bz2 && : && docker-php-ext-install zip && docker-php-ext-install pcntl && docker-php-ext-install pdo_mysql && docker-php-ext-install mysqli && docker-php-ext-install mbstring && docker-php-ext-install exif && docker-php-ext-install bcmath && docker-php-ext-install calendar && docker-php-ext-install sockets && docker-php-ext-install gettext && docker-php-ext-install shmop && docker-php-ext-install sysvmsg && docker-php-ext-install sysvsem && docker-php-ext-install sysvshm && docker-php-ext-install opcache
--->## [Warning] IPv4 forwarding is disabled. Networking will not work.
---> Running in b4dc7af9e896
使用phpmyadmin,输入用户名密码返回
mysqli_real_connect(): php_network_getaddresses: getaddrinfo failed: Try again
docker ps 查看,mysql容器并没有启动
是什么原因呢?
when I run docker-compose -f docker-compose56.yml up in the dnmp dir with mac os10.13 or centos 7 ,it throws a error ,like this:
The following packages have unmet dependencies:
libfreetype6-dev : Depends: zlib1g-dev but it is not going to be installed or
libz-dev
libpng12-dev : Depends: zlib1g-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
ERROR: Service 'php' failed to build: The command '/bin/sh -c apt-get update && apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && docker-php-ext-install gd && : && apt-get install -y libicu-dev && docker-php-ext-install intl && : && apt-get install -y libxml2-dev && apt-get install -y libxslt-dev && docker-php-ext-install soap && docker-php-ext-install xsl && docker-php-ext-install xmlrpc && docker-php-ext-install wddx && : && apt-get install -y libbz2-dev && docker-php-ext-install bz2 && : && docker-php-ext-install zip && docker-php-ext-install pcntl && docker-php-ext-install pdo_mysql && docker-php-ext-install mysqli && docker-php-ext-install mbstring && docker-php-ext-install exif && docker-php-ext-install bcmath && docker-php-ext-install calendar && docker-php-ext-install sockets && docker-php-ext-install gettext && docker-php-ext-install shmop && docker-php-ext-install sysvmsg && docker-php-ext-install sysvsem && docker-php-ext-install sysvshm && docker-php-ext-install opcache' returned a non-zero code: 100
phpmyadmin登录的时候,输入root和密码123不能登录。请问默认的Mysql用户名密码是什么
composer 依赖php环境,怎么才能使用composer
$docker compose-up show error
Notice: Undefined variable: proxy_port in PEAR/Proxy.php on line 163
No releases available for package "pecl.php.net/redis"
install failed
ERROR: Service 'php72' failed to build: The command '/bin/sh -c pecl install redis-3.1.4 && docker-php-ext-enable redis && : && pecl install xdebug-2.6.0alpha1 && docker-php-ext-enable xdebug && : && apt-get install -y libmagickwand-dev && pecl install imagick-3.4.3 && docker-php-ext-enable imagick && : && apt-get install -y libmemcached-dev zlib1g-dev && pecl install memcached-3.0.4 && docker-php-ext-enable memcached' returned a non-zero code: 1
Notice: Undefined variable: proxy_host in PEAR/Proxy.php on line 163
Notice: Undefined variable: proxy_port in PEAR/Proxy.php on line 163
No releases available for package "pecl.php.net/redis"
install failed
ERROR: Service 'php72' failed to build: The command '/bin/sh -c pecl install redis-3.1.4 && docker-php-ext-enable redis && : && pecl install xdebug-2.6.0alpha1 && docker-php-ext-enable xdebug && : && apt-get install -y libmagickwand-dev && pecl install imagick-3.4.3 && docker-php-ext-enable imagick && : && apt-get install -y libmemcached-dev zlib1g-dev && pecl install memcached-3.0.4 && docker-php-ext-enable memcached' returned a non-zero code: 1
Mac版本为:10.13.6
错误信息如下:
ERROR: for dnmp_nginx_1 Cannot start service nginx: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:402: container init caused "rootfs_linux.go:58: mounting \"/www/docker/dnmp/conf/nginx.conf\" to rootfs \"/mnt/sda1/varStarting dnmp_redis_1 ... done
Starting dnmp_phpredisadmin_1 ... done
74a74cd/etc/nginx/nginx.conf\" caused \"not a directory\""": unknown: Are you trying toStarting dnmp_mysql_1 ... error
the expected type
ERROR: for dnmp_mysql_1 Cannot start service mysql: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:402: container init caused "rootfs_linux.go:58: mounting \"/www/docker/dnmp/conf/mysql.cnf\" to rootfs \"/mnt/sda1/var/lib/docker/aufs/mnt/9483012af8ad00ef2a1b3a6720f9c88e478d51c845dd7dba70497ac3a0f5af52\" at \"/mnt/sda1/var/lib/docker/aufs/mnt/9483012af8ad00ef2a1b3a6720f9c88e478d51c845dd7dba70497ac3a0Recreating dnmp_php_1 ... error
ng to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
ERROR: for dnmp_php_1 Cannot start service php: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:402: container init caused "rootfs_linux.go:58: mounting \"/www/docker/dnmp/conf/php-fpm.conf\" to rootfs \"/mnt/sda1/var/lib/docker/aufs/mnt/94973dee0374c72294e63702ec89ea5c668fc5d4eceaa7757fb364bdd5cccb87\" at \"/mnt/sda1/var/lib/docker/aufs/mnt/94973dee0374c72294e63702ec89ea5c668fc5d4eceaa7757fb364bdd5cccb87/usr/local/etc/php-fpm.d/www.conf\" caused \"not a directory\""": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
ERROR: for nginx Cannot start service nginx: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:402: container init caused "rootfs_linux.go:58: mounting \"/www/docker/dnmp/conf/nginx.conf\" to rootfs \"/mnt/sda1/var/lib/docker/aufs/mnt/939581fbda36b4b5276677dc2f6338331aae2c76c78af6c5cf893852a74a74cd\" at \"/mnt/sda1/var/lib/docker/aufs/mnt/939581fbda36b4b5276677dc2f6338331aae2c76c78af6c5cf893852a74a74cd/etc/nginx/nginx.conf\" caused \"not a directory\""": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
ERROR: for mysql Cannot start service mysql: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:402: container init caused "rootfs_linux.go:58: mounting \"/www/docker/dnmp/conf/mysql.cnf\" to rootfs \"/mnt/sda1/var/lib/docker/aufs/mnt/9483012af8ad00ef2a1b3a6720f9c88e478d51c845dd7dba70497ac3a0f5af52\" at \"/mnt/sda1/var/lib/docker/aufs/mnt/9483012af8ad00ef2a1b3a6720f9c88e478d51c845dd7dba70497ac3a0f5af52/etc/mysql/conf.d/mysql.cnf\" caused \"not a directory\""": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
ERROR: for php Cannot start service php: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:402: container init caused "rootfs_linux.go:58: mounting \"/www/docker/dnmp/conf/php-fpm.conf\" to rootfs \"/mnt/sda1/var/lib/docker/aufs/mnt/94973dee0374c72294e63702ec89ea5c668fc5d4eceaa7757fb364bdd5cccb87\" at \"/mnt/sda1/var/lib/docker/aufs/mnt/94973dee0374c72294e63702ec89ea5c668fc5d4eceaa7757fb364bdd5cccb87/usr/local/etc/php-fpm.d/www.conf\" caused \"not a directory\""": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
ERROR: Encountered errors while bringing up the project.
Starting lnmp_mysql_1
ERROR: for mysql Cannot start service mysql: oci runtime error: container_linux.go:247: starting container process caused "process_linux.go:359: container init caused "rootfs_linux.go:54: mounting \"/F/docker/lnmp/conf/mysql/mysql.cnf\" to rootfs \"/var/lib/docker/overlay2/c7c277a751ceb21a014548e0625fbbbf9f141179ccf4d596bb89b8e6dd08cf9a/merged\" at \"/var/lib/docker/overlay2/c7c277a751ceb21a014548e0625fbbbf9f141179ccf4d596bb89b8e6dd08cf9a/merged/etc/mysql/conf.d/mysql.cnf\" caused \"not a directory\"""
: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
ERROR: Encountered errors while bringing up the project.
我没有使用过Debian系统,而且对docker安装xdebug扩展命令不了解,所以没办法在PHP的dockerfile内编写xdebug安装指令,需求帮助。
你好,能不能像PHP多版本那样,mysql也增加个5.7的版本,使用的网站程序不支持mysql8,我把8.0改成5.7一直没成功过,对容器服务不是太熟悉修改了几处也不行。还有就是PHP的版本可不可以写在一个yml文件中,修改成不同的端口映射,那样可以同时使用多个版本的PHP。期待您的回复,谢谢!
The following packages have unmet dependencies:
libfreetype6-dev : Depends: zlib1g-dev but it is not going to be installed or
libz-dev
libpng12-dev : Depends: zlib1g-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
ERROR: Service 'php5.6' failed to build: The command '/bin/sh -c apt-get update && apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && docker-php-ext-install gd && : && apt-get install -y libicu-dev && docker-php-ext-install intl && : && apt-get install -y libxml2-dev && apt-get install -y libxslt-dev && docker-php-ext-install soap && docker-php-ext-install xsl && docker-php-ext-install xmlrpc && docker-php-ext-install wddx && : && apt-get install -y libbz2-dev && docker-php-ext-install bz2 && : && docker-php-ext-install zip && docker-php-ext-install pcntl && docker-php-ext-install pdo_mysql && docker-php-ext-install mysqli && docker-php-ext-install mbstring && docker-php-ext-install exif && docker-php-ext-install bcmath && docker-php-ext-install calendar && docker-php-ext-install sockets && docker-php-ext-install gettext && docker-php-ext-install shmop && docker-php-ext-install sysvmsg && docker-php-ext-install sysvsem && docker-php-ext-install sysvshm && docker-php-ext-install opcache && : && apt-get install -y libmcrypt-dev && docker-php-ext-install mcrypt && : && apt-get install -y curl && apt-get install -y libcurl3 && apt-get install -y libcurl4-openssl-dev && docker-php-ext-install curl && : && apt-get install -y inetutils-ping && apt-get install -y net-tools && : && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer && :RUN pecl install redis-3.1.4 && docker-php-ext-enable redis && : && pecl install xdebug-2.5.5 && docker-php-ext-enable xdebug && : && apt-get install -y libmagickwand-dev && pecl install imagick-3.4.3 && docker-php-ext-enable imagick && : && apt-get install -y libmemcached-dev zlib1g-dev && pecl install memcached-2.2.0 && docker-php-ext-enable memcached' returned a non-zero code: 100
建立好的网站应该授予哪一个用户组权限,我的都是root,应该不对吧。
php的扩展安装能否加一个说明
按照快速使用方法,git clone后,运行docker-compose up,提示需要yaml文件;那clone下来的是在哪个目录?
貌似PHP没有安装REDIS扩展?在php.ini和phpinfo()里没有找到有关redis.so的扩展配置,php也无法连接redis,请教了
I want to try with the latest version. but it will prompt "Error: version in docker-compose.yml is unsupported."
my docker and docker-compose is latest one: 18.03.1 and 1.8.0 .
mysqld: File '/var/log/dnmp/mysql.slow.log' not found (Errcode: 13 - Permission denied)
手工进去 chmod 777 /var/log/dnmp/mysql.slow.log 才可以~ 怎么自动化呢?
Creating dnmp_php72_1 ... error
ERROR: for dnmp_php72_1 Cannot start service php72: b'Cannot link to a non running container: /dnmp_mysql_1 AS /dnmp_php72_1/dnmp_mysql_1'
ERROR: for php72 Cannot start service php72: b'Cannot link to a non running container: /dnmp_mysql_1 AS /dnmp_php72_1/dnmp_mysql_1'
ERROR: Encountered errors while bringing up the project.
what can i do
安装的步骤完成后,进入下面的步骤停在这个步骤很长时间:
mysql_1 | 2017-10-24T06:40:54.275419Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority(). mysql_1 | 2017-10-24T06:40:54.303899Z 0 [Note] InnoDB: Highest supported file format is Barracuda. mysql_1 | 2017-10-24T06:40:54.313734Z 0 [Note] InnoDB: Log scan progressed past the checkpoint lsn 12169644 mysql_1 | 2017-10-24T06:40:54.313766Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 12169653 mysql_1 | 2017-10-24T06:40:54.313771Z 0 [Note] InnoDB: Database was not shutdown normally! mysql_1 | 2017-10-24T06:40:54.313774Z 0 [Note] InnoDB: Starting crash recovery. mysql_1 | 2017-10-24T06:40:54.479369Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1" mysql_1 | 2017-10-24T06:40:54.479411Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables mysql_1 | 2017-10-24T06:40:54.480688Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... mysql_1 | 2017-10-24T06:40:54.527029Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB. mysql_1 | 2017-10-24T06:40:54.530717Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active. mysql_1 | 2017-10-24T06:40:54.530751Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active. mysql_1 | 2017-10-24T06:40:54.531030Z 0 [Note] InnoDB: Waiting for purge to start mysql_1 | 2017-10-24T06:40:54.582195Z 0 [Note] InnoDB: 5.7.20 started; log sequence number 12169653 mysql_1 | 2017-10-24T06:40:54.582816Z 0 [Note] Plugin 'FEDERATED' is disabled. mysql_1 | 2017-10-24T06:40:54.584021Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool mysql_1 | 2017-10-24T06:40:54.621035Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them. mysql_1 | 2017-10-24T06:40:54.632924Z 0 [Warning] CA certificate ca.pem is self signed. mysql_1 | 2017-10-24T06:40:54.634393Z 0 [Note] Server hostname (bind-address): '*'; port: 3306 mysql_1 | 2017-10-24T06:40:54.634449Z 0 [Note] IPv6 is available. mysql_1 | 2017-10-24T06:40:54.634456Z 0 [Note] - '::' resolves to '::'; mysql_1 | 2017-10-24T06:40:54.634470Z 0 [Note] Server socket created on IP: '::'. mysql_1 | 2017-10-24T06:40:54.641016Z 0 [Note] InnoDB: Buffer pool(s) load completed at 171024 6:40:54 mysql_1 | 2017-10-24T06:40:54.663197Z 0 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode. mysql_1 | 2017-10-24T06:40:54.663240Z 0 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode. mysql_1 | 2017-10-24T06:40:54.663851Z 0 [Warning] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode. mysql_1 | 2017-10-24T06:40:54.663870Z 0 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode. mysql_1 | 2017-10-24T06:40:54.664440Z 0 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode. mysql_1 | 2017-10-24T06:40:54.699472Z 0 [Warning] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode. mysql_1 | 2017-10-24T06:40:54.699500Z 0 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode. mysql_1 | 2017-10-24T06:40:54.886573Z 0 [Note] Event Scheduler: Loaded 0 events mysql_1 | 2017-10-24T06:40:54.887047Z 0 [Note] mysqld: ready for connections. mysql_1 | Version: '5.7.20-log' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server (GPL) mysql_1 | 2017-10-24T06:40:54.887074Z 0 [Note] Executing 'SELECT * FROM INFORMATION_SCHEMA.TABLES;' to get a list of tables using the deprecated partition engine. You may use the startup option '--disable-partition-engine-check' to skip this check. mysql_1 | 2017-10-24T06:40:54.887078Z 0 [Note] Beginning of list of non-natively partitioned tables mysql_1 | 2017-10-24T06:40:55.228798Z 0 [Note] End of list of non-natively partitioned tables
过很久会显示下面的内容:
2017-10-24T05:26:51.351060Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 119786ms. The settings might not be optimal. (flushed=0 and evicted=0, during the time.)
如何配置mysql5.7,我一次都没成功过(不是高手没办法),能不能像PHP可以选择版本一样,给做个mysql5.7的yml文件,谢谢!
I run it in ubuntu 16.04 and get error:
mysql_1 | mysqld: File '/var/log/mysql/mysql-slow.log' not found (Errcode: 13 - Permission denied)
mysql_1 | 2017-11-29T07:57:28.288062Z 0 [ERROR] Could not use /var/log/mysql/mysql-slow.log for logging (error 13 - Permission denied).
I wonder why this mysql-slow.log couldn't be generated automatically? should we manually touch one?
pecl -vvv install redis-3.1.4
`Warning: file_exists(): Unable to find the wrapper "channel" - did you forget to enable it when you configured PHP? in PEAR/Downloader/Package.php on line 1511
Warning: is_file(): Unable to find the wrapper "channel" - did you forget to enable it when you configured PHP? in PEAR/Downloader/Package.php on line 1521
Warning: is_file(): Unable to find the wrapper "channel" - did you forget to enable it when you configured PHP? in PEAR/Downloader/Package.php on line 1521
Warning: fsockopen(): Failed to enable crypto in PEAR/Proxy.php on line 179
Warning: fsockopen(): unable to connect to ssl://pecl.php.net:443 (Unknown error) in PEAR/Proxy.php on line 179
No releases available for package "pecl.php.net/redis"
Cannot initialize 'channel://pecl.php.net/redis-3.1.4', invalid or missing package file
Package "channel://pecl.php.net/redis-3.1.4" is not valid
install failed`
7 nginx配置文件
这里,我们还需要稍微修改nginx配置文件:
location ~ .php$ {
fastcgi_pass fpm:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
这里,我们仅需把fastcgi_pass改成:fpm:9000。
也就是,PHP-FPM的侦听主机改成:Nginx links PHP-FPM容器的别名,在docker-compose.yml文件里面我们设置为fpm。
在这一步没有找到fpm:9000 也没有找到Nginx links PHP-FPM容器的别名
Hlz-Mac:docker ihziluoh$ cd dnmp-master/
Hlz-Mac:dnmp-master ihziluoh$ docker-compose up
Building php-fpm
Step 1/16 : FROM php:fpm
---> 9b44e8b4c8b6
Step 2/16 : RUN apt-get update
---> Running in 83ad66ef7db6
Get:1 http://security.debian.org jessie/updates InRelease [63.1 kB]
Ign http://deb.debian.org jessie InRelease
Get:2 http://deb.debian.org jessie-updates InRelease [145 kB]
Get:3 http://security.debian.org jessie/updates/main amd64 Packages [391 kB]
Get:4 http://deb.debian.org jessie Release.gpg [2373 B]
Get:5 http://deb.debian.org jessie-updates/main amd64 Packages [23.1 kB]
Get:6 http://deb.debian.org jessie Release [148 kB]
Get:7 http://deb.debian.org jessie/main amd64 Packages [9035 kB]
W: Failed to fetch http://security.debian.org/dists/jessie/updates/main/binary-amd64/Packages Hash Sum mismatch
Fetched 9808 kB in 11s (839 kB/s)
W: Failed to fetch http://deb.debian.org/debian/dists/jessie/main/binary-amd64/Packages Hash Sum mismatch
E: Some index files failed to download. They have been ignored, or old ones used instead.
ERROR: Service 'php-fpm' failed to build: The command '/bin/sh -c apt-get update' returned a non-zero code: 100
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.