By Sergey Kibish / @s_kibish
$ apt-get install docker-engine
“Compose is a tool for defining and running multi-container applications with Docker. With Compose, you define a multi-container application in a single file, then spin your application up in a single command which does everything that needs to be done to get it running.”
web: image: nginx:latest ports: - 80:80 volumes: - .:/var/www/html - ./config/vhost.conf:/etc/nginx/conf.d/vhost.conf links: - php php: build: ./config/php volumes: - .:/var/www/html - ./config/php-fpm.conf:/etc/php5/fpm/php-fpm.conf links: - db db: image: mysql:latest ports: - 3306:3306 environment: - MYSQL_ROOT_PASSWORD=root - MYSQL_DATABASE=todo
$ docker pull composer/composer
FROM php:5.6-fpm
RUN apt-get update && apt-get install -y \
libmcrypt-dev \
libpq-dev \
&& docker-php-ext-install mcrypt mbstring \
&& docker-php-ext-install mysqli pdo pdo_mysql tokenizer
EXPOSE 9000
CMD ["php-fpm"]