Last active
January 14, 2022 10:25
-
-
Save bocharsky-bw/3ef82076f022ba11fad9 to your computer and use it in GitHub Desktop.
The full-stack [Ubuntu, Nginx, php-fpm] Docker image example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
web: | |
build: . | |
ports: | |
- "88:80" | |
volumes: | |
- ./:/var/www/symfony/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu | |
MAINTAINER Victor Bocharsky <[email protected]> | |
RUN apt-get update | |
RUN apt-get install -y nginx php5 php5-fpm php5-intl php5-mysql php5-xdebug | |
RUN echo "\ndaemon off;" >> /etc/nginx/nginx.conf | |
RUN sed -i -e "s/;\?daemonize\s*=\s*yes/daemonize = no/g" /etc/php5/fpm/php-fpm.conf | |
# Nginx config | |
RUN rm /etc/nginx/sites-enabled/default | |
ADD ./docker/symfony.conf /etc/nginx/sites-available/ | |
RUN ln -s /etc/nginx/sites-available/symfony.conf /etc/nginx/sites-enabled/symfony.conf | |
# PHP config | |
RUN sed -i -e "s/;\?date.timezone\s*=\s*.*/date.timezone = Europe\/Kiev/g" /etc/php5/fpm/php.ini | |
# Define default command. | |
CMD service php5-fpm start && nginx | |
# Expose ports. | |
EXPOSE 80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yeah, this is an old config... changing
php5
to justphp
should work I think