Skip to content

Instantly share code, notes, and snippets.

@tschallacka
Forked from sveneisenschmidt/Dockerfile-php
Created March 30, 2021 10:05
Show Gist options
  • Save tschallacka/5d842e814e80c483aef3c5b2bb55b710 to your computer and use it in GitHub Desktop.
Save tschallacka/5d842e814e80c483aef3c5b2bb55b710 to your computer and use it in GitHub Desktop.
{
"require": {
"php": ">=5.5",
"ext-intl" : "*",
"silex/silex": "~1.2",
"twig/twig": "~1.15",
"symfony/twig-bridge": "~2.5",
"symfony/security": "~2.5",
"symfony/yaml": ">=2.5,<2.7",
"symfony/form": "~2.5",
"symfony/validator": "~2.5",
"symfony/config": "~2.5",
"symfony/security-csrf": "~2.5",
"symfony/locale": "~2.5",
"symfony/doctrine-bridge": "~2.5",
"symfony/translation": "~2.5",
"igorw/config-service-provider": "~1.2",
"incenteev/composer-parameter-handler": "~2.0",
"dflydev/doctrine-orm-service-provider": "~1.0",
"drewm/mailchimp-api": "~1.0",
"swiftmailer/swiftmailer": "~4.1",
"monolog/monolog": "~1.12",
"salva/jshrink-bundle": "^1.1",
"asm89/twig-cache-extension": "~1.0",
"silex/web-profiler": "~1.0"
},
"require-dev": {
"phpunit/phpunit": "~4.0",
"nelmio/alice": "~2.0",
"guzzle/guzzle": "~3.9",
"fabpot/goutte": "~1.0",
"behat/behat": "~2.4",
"behat/mink": "~1.4",
"behat/mink-extension": "*",
"behat/mink-goutte-driver": "*",
"behat/mink-selenium2-driver": "~1.2"
}
}
# Website Development Environment
version: '2'
services:
# Application Server: Website
php:
build:
context: ./
dockerfile: Dockerfile-php
command: "php -S 0.0.0.0:80 -t web web/index.php"
ports:
- "8091:80"
volumes_from:
- sync
working_dir: /var/www
links:
- db:db
- sync:sync
environment:
APPLICATION_ENV: dev
stdin_open: true
tty: true
# Web Development Tools
tools:
build:
context: ./
dockerfile: Dockerfile-tools
volumes_from:
- sync
working_dir: /src
links:
- db:db
- sync:sync
stdin_open: true
tty: true
# Database
db:
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: xyz
# Synchronization
sync:
build:
context: ./
dockerfile: Dockerfile-sync
command: "lsyncd -delay 1 -nodaemon -rsync /src /var/www"
volumes:
- /var/www
- "./:/src"
working_dir: /src
stdin_open: true
tty: true
FROM ubuntu:16.04
RUN PACKAGES="\
php-cli \
php-mysql \
php-intl \
php-xml \
php-curl \
php-dom \
" && \
apt-get update && \
apt-get install -y $PACKAGES && \
apt-get autoremove --purge -y && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
FROM ubuntu:16.04
RUN PACKAGES="\
rsync \
lsyncd \
" && \
apt-get update && \
apt-get install -y $PACKAGES && \
apt-get autoremove --purge -y && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
FROM ubuntu:16.04
RUN PACKAGES="\
nodejs \
nodejs-legacy \
npm \
php-cli \
php-mysql \
php-intl \
php-xml \
php-curl \
php-dom \
wget \
zip \
unzip \
git \
libfreetype6 \
libfontconfig \
" && \
apt-get update && \
apt-get install -y $PACKAGES && \
apt-get autoremove --purge -y && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN cd /tmp && \
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
php composer-setup.php --install-dir=/usr/bin --filename=composer && \
php -r "unlink('composer-setup.php');" && \
rm -rf /tmp/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment