Changed containers to have all the data included and don't mount any volumes

This commit is contained in:
Tim de Pater 2016-02-16 10:13:29 +01:00
parent c4677b0278
commit 126068b319
7 changed files with 14 additions and 10 deletions

View File

@ -1,4 +1,5 @@
FROM php:7.0-fpm
FROM debian:jessie
COPY config/php.ini /usr/local/etc/php/conf.d/custom.ini
ADD ./src/ /var/www/html/
COPY src/ /var/www/html/
VOLUME /var/www/html/

View File

@ -17,4 +17,5 @@ See the PHP info on http://docker-app.dev
Resources & inspiration
-----------------------
https://ejosh.co/de/2015/09/how-to-link-docker-containers-together
https://github.com/johanan/Ansible-and-Docker

View File

@ -1,19 +1,15 @@
appdata:
image: debian:jessie
volumes:
- ./src:/var/www/html
build: .
fpm:
build: .
build: ./fpm
volumes_from:
- appdata
nginx:
image: nginx:1.9
build: ./nginx
links:
- fpm
volumes:
- ./config/nginx.conf:/etc/nginx/conf.d/app.conf:ro
volumes_from:
- appdata
ports:

3
fpm/Dockerfile Normal file
View File

@ -0,0 +1,3 @@
FROM php:7.0-fpm
COPY php.ini /usr/local/etc/php/conf.d/custom.ini

3
nginx/Dockerfile Normal file
View File

@ -0,0 +1,3 @@
FROM nginx:1.9
COPY nginx.conf /etc/nginx/conf.d/app.conf