Skip to content

Commit

Permalink
Update Dockerfile to enable change listen port (#191)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gebing authored Jan 9, 2023
1 parent 88b5d92 commit 46be650
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ RUN composer install

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

ENV PORT 80
EXPOSE 80
ENTRYPOINT [ "tini", "--", "php", "-S", "0.0.0.0:80" ]
ENTRYPOINT [ "sh", "-c", "tini -- php -S 0.0.0.0:$PORT" ]

0 comments on commit 46be650

Please sign in to comment.