Skip to content

Instantly share code, notes, and snippets.

@jlandure
Created September 2, 2021 11:36
Show Gist options
  • Save jlandure/813e3176d0e8d17efa524b4752efae98 to your computer and use it in GitHub Desktop.
Save jlandure/813e3176d0e8d17efa524b4752efae98 to your computer and use it in GitHub Desktop.
Expose a different port in Apache image?
FROM php:7.0-apache
ENV PORT 80
ENTRYPOINT []
CMD sed -i "s/80/$PORT/g" /etc/apache2/sites-available/000-default.conf /etc/apache2/ports.conf && docker-php-entrypoint apache2-foreground
#https://github.com/docker-library/php/issues/94#issuecomment-320695125
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment