I want to run laravel app, in docker. Here are my steps. I hope someone will tell me what went wrong.
1. Create a laravel app locally
composer create-project --prefer-dist laravel/laravel laravel-app 5.6
2. Create docker-compose.yml
version: "3"
services:
php:
image: php:7-fpm
ports:
- "3021:8000"
volumes:
- ./laravel-app:/app
composer:
image: composer:latest
volumes:
- ./laravel-app:/app
working_dir: /app
command: ["install","php artisan serve --host=0.0.0.0"]
depends_on:
- php
then I run docker-compose up-- force-recreate-d , and I am unable to get any information through the password 127.0.0.1 force-recreate 3021 .
so I execute docker-composer log and find that the following error notification pops up in terminal
Invalid argument php artisan serve --host=0.0.0.0. Use "composer require php artisan serve --host=0.0.0.0" instead to add packages to your composer.json.
how should I correct my errors?