Skip to content

Instantly share code, notes, and snippets.

@manuelep
Last active November 21, 2022 14:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manuelep/4551836f72ca3df9526be3df4f982a1c to your computer and use it in GitHub Desktop.
Save manuelep/4551836f72ca3df9526be3df4f982a1c to your computer and use it in GitHub Desktop.
php-image-test
# docker-compose.yml
version: '3.3'
services:
php:
# image: php:7.4-apache
build:
context: .
dockerfile: php.Dockerfile
container_name: pcge
ports:
- 8088:80
volumes:
- ./emergenze-pcge:/var/www/html/emergenze-pcge
# TODO
FROM php:7.4-apache
RUN apt-get update \
&& apt-get install -y postgresql postgresql-contrib \
&& apt-get install sudo \
&& apt-get install -y libpq-dev \
&& docker-php-ext-install pdo pdo_pgsql \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# RUN cp /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini
RUN cp /usr/local/etc/php/php.ini-development /usr/local/etc/php/php.ini
RUN sed -i '934 s/^;//' /usr/local/etc/php/php.ini
# This Dockerfile doesn't need to have an entrypoint and a command
# as Bitbucket Pipelines will overwrite it with a bash script.
CMD ["apache2-foreground"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment