Check when the container cannot be accessed from Host in the Laravel on docker environment using VS Code's Remote container.
First PHP, Laravel, only the remedy memo
--Using VSCode Remote container --Composed of Nginx, Laravel, and DB containers --Host, access localhost: 8000 with Chrome from outside the container
Access from local (host) with remote container of VSCode Become a 502 Bad Gateway
.devcontainer/devcontainer.json
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [
8000
],
With the above settings
local => It seems that nginx in the container can be reached
Comment out the following command
of .devcontainer / devcontainer.json
# Overrides default command so things don't shut down after the process ends.
#Comment out the following
# command: /bin/sh -c "while sleep 1000; do :; done"
Recommended Posts