Tag: 拉拉维尔

Laravel 5.2 – Artisan Optimize – 找不到类TestMakeCommand

我在docker / w共享代码卷上运行我的本地环境。 当我的Dockerfile运行php artisan optimize失败… Step 14/15 : RUN composer install && composer update —> Running in 94698cafb7bf Do not run Composer as root/super user! See https://getcomposer.org/root for details Loading composer repositories with package information Installing dependencies (including require-dev) from lock file Package operations: 0 installs, 2 updates, 0 removals – Updating aws/aws-sdk-php (3.30.0 […]

Laravel在Mac OS X上的Docker上

描述 我跟着这个posthttps://medium.com/@andrewmclagan/you-thought-laravel-homestead-was-easy-say-hello-to-docker-2c0639a0501 做了一切,直到最后。 尝试 运行docker-up时 我一直在得到 🌈 laravel docker-compose up Pulling cache (redis:latest)… latest: Pulling from library/redis d13d02fa248d: Pull complete a1846f364e39: Pull complete dba901efed8c: Pull complete b54b43b9d049: Pull complete b5b9e2d5e9c6: Pull complete 7058d282fa00: Pull complete Digest: sha256:07e7b6cb753f8d06a894e22af30f94e04844461ab6cb002c688841873e5e5116 Status: Downloaded newer image for redis:latest Pulling database (mysql:latest)… latest: Pulling from library/mysql 85b1f47fba49: Pull complete 27dc53f13a11: Pull […]

Laradock不能使用mysql

我不明白如何让Laradock正确使用MySQL数据库。 我遵循laradock文档并安装了所有东西,使用容器 docker-compose up -d nginx mysql 我有这样的多个项目版本布局 project +laradock-spa PHP方面似乎工作,我可以得到laravel欢迎页面,但是获取数据库连接正在导致我的问题。 首先,我应该在哪里运行php artisan migrate这样的php artisan migrate命令? 应该从我的机器在项目文件夹中运行,还是从Docker容器中运行? 当我从我的项目文件夹运行它,它的工作原理,我可以进入MySQL容器,看到初始数据库表,如migration和user 。 但是,我不能得到一个初步的邮政信箱数据库工作邮递员 – 我得到错误SQLSTATE[HY000] [2002] No such file or directory (SQL: insert into users (… 所以我想也许我应该从工作区容器中运行migrate命令,所以我进入工作区,但从这里php artisan migrate命令错误与[Illuminate\Database\QueryException] SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from information_schem a.tables where table_schema = spa and table_name […]

500(内部服务器错误)与Laravel和Docker

我在Docker中创build了Laravel PHP应用程序。 首先,我使用Laravel应用程序 laravel new laravelDockerApp 它创build成功。我validation它是由内置服务器设置的 php artisan serve 然后用Docker设置本地环境 泊坞窗,compose.yml version: '2' services: web: build: context: ./ dockerfile: web.docker volumes: – ./:/var/www ports: – "8080:80" links: – app app: build: context: ./ dockerfile: app.docker volumes: – ./:/var/www app.docker FROM php:7-fpm RUN apt-get update && apt-get install -y libmcrypt-dev mysql-client \ && docker-php-ext-install mcrypt […]

在Docker中为Laravel创build一个开发环境

我在Ubuntu机器上安装了一个定制的Laravel。 然而按照Laravel的指示,我没有使用Homestead来启动我的应用程序。 相反,我使用composer php在我的机器上安装了应用程序,然后根据需要安装依赖项和库。 现在我想用另一台机器进行开发。 如何使用Docker打包我的机器环境的副本以创build要在另一台机器上使用的容器。 我是Docker的新手,因为什么原因没有使用过。