[root@localhost ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
369caac73fe5 php:7.4.6-apache "docker-php-entrypoi…" 48 minutes ago Up 23 minutes 80/tcp, 0.0.0.0:8000->8000/tcp web_laravel
I have deployed the Laravel 8.x
source code in web_laravel
docker. I did not get any error while running composer update
and php artisan serve
.
# php artisan serve
Starting Laravel development server: http://127.0.0.1:8000
[Mon Jan 20:01:04 2021] PHP 7.4.6 Development Server (http://127.0.0.1:8000) started
But, when I access 192.168.1.xx:8000
in browser, I get the following error.
192.168.1.xx refuses to connect
I tried to ping 192.168.1.xx
, it works fine. But, I got the following error when using telnet
.
$ telnet 192.168.1.xx 8000
Trying 192.168.1.xx...
telnet: Unable to connect to remote host: Connection refused
It seems that I am having a little problem with starting Laravel server in docker. Could anybody help me?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…