Skip to content

Commit 46be650

Browse files
authored
Update Dockerfile to enable change listen port (#191)
Docker can not change the exported port when in host mode, and port 80 open used by http server. So i made this to enable change the listening port by environment variables.
1 parent 88b5d92 commit 46be650

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ RUN composer install
1212

1313
RUN cp includes/config.environment.inc.php includes/config.inc.php
1414

15+
ENV PORT 80
1516
EXPOSE 80
16-
ENTRYPOINT [ "tini", "--", "php", "-S", "0.0.0.0:80" ]
17+
ENTRYPOINT [ "sh", "-c", "tini -- php -S 0.0.0.0:$PORT" ]

0 commit comments

Comments
 (0)