imacken / devdock Goto Github PK
View Code? Open in Web Editor NEWBuild php development & production environment based on Docker
License: MIT License
Build php development & production environment based on Docker
License: MIT License
E: Failed to fetch http://101.110.118.47/ppa.launchpad.net/ondrej/php/ubuntu/pool/main/p/php7.1/php7.1-mcrypt_7.1.19-1+ubuntu16.04.1+deb.sury.org+1_amd64.deb Unable to connect to 101.110.118.47:http:
docker小白不太懂,整个请求的流程是不是像下面这样的?
client->nginx->php-fpm->workspace(php-cli)->php-fpm->nginx->client
如果是的话,php-fpm->workspace(php-cli)->php-fpm 这几步流程是具体怎么实现的,是走端口吗? 看了laradock的workspace里面有个crontab的文件 跑了这个命令 php /var/www/artisan 这个应该是内置的服务器吧, 是不是通过这个连接了php-fpm和workspace两个容器?
谢谢~~
我已经确保安装了docker
并且我可以正常的自己pull镜像并创建容器
我根据你的使用指南clone 项目以后,进入项目
执行命令docker-compose up -d nginx mysql redis (因为看见你的说明里面,说phpfpm依赖不需要特地添加)
最后获得的错误是
WARNING: The PMA_DB_ENGINE variable is not set. Defaulting to a blank string.
WARNING: The PMA_PORT variable is not set. Defaulting to a blank string.
WARNING: The PHP_VERSION variable is not set. Defaulting to a blank string.
WARNING: The PHP_WORKER_SUPERVISORD_CONF variable is not set. Defaulting to a blank string.
WARNING: The DOCKER_HOST_IP variable is not set. Defaulting to a blank string.
WARNING: The APPLICATION variable is not set. Defaulting to a blank string.
WARNING: The PHP_IDE_CONFIG variable is not set. Defaulting to a blank string.
WARNING: The PHP_FPM_INSTALL_XDEBUG variable is not set. Defaulting to a blank string.
WARNING: The PHP_FPM_INSTALL_SOAP variable is not set. Defaulting to a blank string.
WARNING: The PHP_FPM_INSTALL_ZIP_ARCHIVE variable is not set. Defaulting to a blank string.
WARNING: The PHP_FPM_INSTALL_PHPREDIS variable is not set. Defaulting to a blank string.
WARNING: The PHP_FPM_INSTALL_MEMCACHED variable is not set. Defaulting to a blank string.
WARNING: The PHP_FPM_INSTALL_MONGO variable is not set. Defaulting to a blank string.
WARNING: The PHP_FPM_XDEBUG_CONF variable is not set. Defaulting to a blank string.
WARNING: The PHP_FPM_INI_CONF variable is not set. Defaulting to a blank string.
WARNING: The PHP_FPM_POOL_CONF variable is not set. Defaulting to a blank string.
WARNING: The NGINX_HOST_LOG_PATH variable is not set. Defaulting to a blank string.
WARNING: The NGINX_SITES_PATH variable is not set. Defaulting to a blank string.
WARNING: The NGINX_CONF variable is not set. Defaulting to a blank string.
WARNING: The NGINX_HOST_HTTP_PORT variable is not set. Defaulting to a blank string.
WARNING: The NGINX_HOST_HTTPS_PORT variable is not set. Defaulting to a blank string.
WARNING: The ELASTICSEARCH_HOST_HTTP_PORT variable is not set. Defaulting to a blank string.
WARNING: The ELASTICSEARCH_HOST_TRANSPORT_PORT variable is not set. Defaulting to a blank string.
WARNING: The WORKSPACE_INSTALL_XDEBUG variable is not set. Defaulting to a blank string.
WARNING: The WORKSPACE_INSTALL_NODE variable is not set. Defaulting to a blank string.
WARNING: The WORKSPACE_INSTALL_SOAP variable is not set. Defaulting to a blank string.
WARNING: The WORKSPACE_INSTALL_YARN variable is not set. Defaulting to a blank string.
WARNING: The WORKSPACE_INSTALL_MONGO variable is not set. Defaulting to a blank string.
WARNING: The WORKSPACE_COMPOSER_GLOBAL_INSTALL variable is not set. Defaulting to a blank string.
WARNING: The WORKSPACE_INSTALL_WORKSPACE_SSH variable is not set. Defaulting to a blank string.
WARNING: The WORKSPACE_PUID variable is not set. Defaulting to a blank string.
WARNING: The WORKSPACE_PGID variable is not set. Defaulting to a blank string.
WARNING: The WORKSPACE_NODE_VERSION variable is not set. Defaulting to a blank string.
WARNING: The WORKSPACE_YARN_VERSION variable is not set. Defaulting to a blank string.
WARNING: The WORKSPACE_TIMEZONE variable is not set. Defaulting to a blank string.
WARNING: The WORKSPACE_XDEBUG_CONF variable is not set. Defaulting to a blank string.
WARNING: The WORKSPACE_CRONTAB variable is not set. Defaulting to a blank string.
WARNING: The MYSQL_DATABASE variable is not set. Defaulting to a blank string.
WARNING: The MYSQL_USER variable is not set. Defaulting to a blank string.
WARNING: The MYSQL_PASSWORD variable is not set. Defaulting to a blank string.
WARNING: The MYSQL_ROOT_PASSWORD variable is not set. Defaulting to a blank string.
WARNING: The MYSQL_CONF variable is not set. Defaulting to a blank string.
WARNING: The MYSQL_PORT variable is not set. Defaulting to a blank string.
WARNING: The MEMCACHED_HOST_PORT variable is not set. Defaulting to a blank string.
WARNING: The MONGODB_PORT variable is not set. Defaulting to a blank string.
ERROR: The Compose file './docker-compose.yml' is invalid because:
services.memcached.ports is invalid: Port ranges don't match in length
services.mongo.ports is invalid: Port ranges don't match in length
services.mysql.ports is invalid: Port ranges don't match in length
services.nginx.ports is invalid: Port ranges don't match in length
services.nginx.ports is invalid: Port ranges don't match in length
services.phpmyadmin.ports is invalid: Port ranges don't match in length
services.elasticsearch.ports is invalid: Port ranges don't match in length
services.elasticsearch.ports is invalid: Port ranges don't match in length
WuillydeMBP% docker-compose up -d nginx mysql redis
WARNING: The PMA_DB_ENGINE variable is not set. Defaulting to a blank string.
WARNING: The PMA_PORT variable is not set. Defaulting to a blank string.
WARNING: The PHP_VERSION variable is not set. Defaulting to a blank string.
WARNING: The PHP_WORKER_SUPERVISORD_CONF variable is not set. Defaulting to a blank string.
WARNING: The DOCKER_HOST_IP variable is not set. Defaulting to a blank string.
WARNING: The APPLICATION variable is not set. Defaulting to a blank string.
WARNING: The PHP_IDE_CONFIG variable is not set. Defaulting to a blank string.
WARNING: The PHP_FPM_INSTALL_XDEBUG variable is not set. Defaulting to a blank string.
WARNING: The PHP_FPM_INSTALL_SOAP variable is not set. Defaulting to a blank string.
WARNING: The PHP_FPM_INSTALL_ZIP_ARCHIVE variable is not set. Defaulting to a blank string.
WARNING: The PHP_FPM_INSTALL_PHPREDIS variable is not set. Defaulting to a blank string.
WARNING: The PHP_FPM_INSTALL_MEMCACHED variable is not set. Defaulting to a blank string.
WARNING: The PHP_FPM_INSTALL_MONGO variable is not set. Defaulting to a blank string.
WARNING: The PHP_FPM_XDEBUG_CONF variable is not set. Defaulting to a blank string.
WARNING: The PHP_FPM_INI_CONF variable is not set. Defaulting to a blank string.
WARNING: The PHP_FPM_POOL_CONF variable is not set. Defaulting to a blank string.
WARNING: The NGINX_HOST_LOG_PATH variable is not set. Defaulting to a blank string.
WARNING: The NGINX_SITES_PATH variable is not set. Defaulting to a blank string.
WARNING: The NGINX_CONF variable is not set. Defaulting to a blank string.
WARNING: The NGINX_HOST_HTTP_PORT variable is not set. Defaulting to a blank string.
WARNING: The NGINX_HOST_HTTPS_PORT variable is not set. Defaulting to a blank string.
WARNING: The ELASTICSEARCH_HOST_HTTP_PORT variable is not set. Defaulting to a blank string.
WARNING: The ELASTICSEARCH_HOST_TRANSPORT_PORT variable is not set. Defaulting to a blank string.
WARNING: The WORKSPACE_INSTALL_XDEBUG variable is not set. Defaulting to a blank string.
WARNING: The WORKSPACE_INSTALL_NODE variable is not set. Defaulting to a blank string.
WARNING: The WORKSPACE_INSTALL_SOAP variable is not set. Defaulting to a blank string.
WARNING: The WORKSPACE_INSTALL_YARN variable is not set. Defaulting to a blank string.
WARNING: The WORKSPACE_INSTALL_MONGO variable is not set. Defaulting to a blank string.
WARNING: The WORKSPACE_COMPOSER_GLOBAL_INSTALL variable is not set. Defaulting to a blank string.
WARNING: The WORKSPACE_INSTALL_WORKSPACE_SSH variable is not set. Defaulting to a blank string.
WARNING: The WORKSPACE_PUID variable is not set. Defaulting to a blank string.
WARNING: The WORKSPACE_PGID variable is not set. Defaulting to a blank string.
WARNING: The WORKSPACE_NODE_VERSION variable is not set. Defaulting to a blank string.
WARNING: The WORKSPACE_YARN_VERSION variable is not set. Defaulting to a blank string.
WARNING: The WORKSPACE_TIMEZONE variable is not set. Defaulting to a blank string.
WARNING: The WORKSPACE_XDEBUG_CONF variable is not set. Defaulting to a blank string.
WARNING: The WORKSPACE_CRONTAB variable is not set. Defaulting to a blank string.
WARNING: The MYSQL_DATABASE variable is not set. Defaulting to a blank string.
WARNING: The MYSQL_USER variable is not set. Defaulting to a blank string.
WARNING: The MYSQL_PASSWORD variable is not set. Defaulting to a blank string.
WARNING: The MYSQL_ROOT_PASSWORD variable is not set. Defaulting to a blank string.
WARNING: The MYSQL_CONF variable is not set. Defaulting to a blank string.
WARNING: The MYSQL_PORT variable is not set. Defaulting to a blank string.
WARNING: The MEMCACHED_HOST_PORT variable is not set. Defaulting to a blank string.
WARNING: The MONGODB_PORT variable is not set. Defaulting to a blank string.
ERROR: The Compose file './docker-compose.yml' is invalid because:
services.memcached.ports is invalid: Port ranges don't match in length
services.mongo.ports is invalid: Port ranges don't match in length
services.mysql.ports is invalid: Port ranges don't match in length
services.nginx.ports is invalid: Port ranges don't match in length
services.nginx.ports is invalid: Port ranges don't match in length
services.phpmyadmin.ports is invalid: Port ranges don't match in length
services.elasticsearch.ports is invalid: Port ranges don't match in length
如题
还是不知道怎么切换到php56
在Mac上部署docker时出现一个问题:
rm: cannot remove '/var/lib/apt/lists/*': No such file or directory
ERROR: Service 'php-fpm' failed to build: The command '/bin/sh -c rm -r /var/lib/apt/lists/*' returned a non-zero code: 1
google之后发现:
终端出现: 'E:Encountered a section with no Package: header, E:Problem with MergeList /var/lib/apt/lists/archive.canonical.com_dists_maverick_partner_binary-i386_Packages, E:无法解析或打开软件包的列表或是状态文件。'
解决方法,终端执行:
sudo rm -rf /var/lib/apt/lists/* -vf
sudo apt-get update
看样子只有在apt出问题时才会使用这个方法,如果想要一个干净的环境 rm -rf /var/lib/apt/lists/
这个方式可能解决这个问题。
另:
docker --version
Docker version 17.06.0-ce, build 02c1d87
ERROR: Service 'php-fpm' failed to build: The command '/bin/sh -c if [ ${INSTALL_SOAP} = true ]; then apt-get update -yqq && apt-get -y install libxml2-dev php-soap && docker-php-ext-install soap ;fi' returned a non-zero code: 100
先谢谢您提供的这个repo,跑起开发环境来简直太爽了.
有个问题请教下.
里面的apt-update 相当的慢. 怎么能够去掉?
还有就是应该不会每次up 都会执行apt-update吧?
就是根目录是public外层的文件夹
ERROR: Service 'php-fpm' failed to build: The command '/bin/sh -c apt-get update && apt-get install -y --no-install-recommends curl libmemcached-dev libz-dev libpq-dev libjpeg-dev libpng12-dev libfreetype6-dev libssl-dev libmcrypt-dev && pecl channel-update pecl.php.net && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100;
php-ftm/Dockerfile-71:
libpng12-dev \ => libpng-dev \
server_name laravel.app;
root /var/www/laravel/public;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
进入docker 后的目录
/var/www/laravel/public
root@3eb093c21707:/var/www/laravel/public# ls
index.php
root@3eb093c21707:/var/www/laravel/public#
访问的结果是404
执行:docker-compose up -d nginx mysql后报错:
Unsupported config option for services service: 'phpmyadmin'
是什么问题呢
按照redeme方法操作,运行下面的命令:
docker-compose up -d nginx php-fpm php-worker mysql redis memcached elasticsearch workspace
结果报错:
ERROR: Cannot locate specified Dockerfile: Dockerfile-72
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.