-
-
Notifications
You must be signed in to change notification settings - Fork 123
Description
The recent pull request #494, which changes the default behavior to only listen on 127.0.0.1, has caused issues when running Symfony CLI in a Docker container. Specifically, the following ENTRYPOINT
command no longer works as expected:
ENTRYPOINT ["symfony", "server:start", "--no-tls", "--port=80"]
Steps to Reproduce:
Create a Dockerfile with the following content:
FROM php:8.2-fpm-alpine3.17
RUN curl -s https://get.symfony.com/cli/installer | bash \
&& mv /root/.symfony5/bin/symfony /usr/local/bin/symfony
WORKDIR /var/www/html
ENTRYPOINT ["symfony", "server:start", "--no-tls", "--port=80"]
Build and run the Docker container.
Attempt to access the Symfony server from outside the container.
Expected Behavior:
The Symfony server should be accessible from outside the Docker container. Actual Behavior: The server is not accessible because it only listens on 127.0.0.1.
Proposed Solution:
Allow specifying the address to listen on via an environment variable or command-line option, or revert the default behavior to listen on all addresses (0.0.0.0).
Additional Context:
This issue affects users who rely on Docker for their development and deployment workflows. The change in default behavior has introduced a breaking change for these users.