I want to mimic a centos7 server with phpfpm, nginx, mysql on Docker for Mac.
Currently I have this in my docker-compose.yml
, but, haven't stated anything about an OS anywhere.
version: '2'
services:
web:
build: .
image: nginx:latest
ports:
- "8080:80"
volumes:
- ./code:/code
- ./default.conf:/etc/nginx/conf.d/default.conf
networks:
- code-network
php:
image: php:fpm
volumes:
- ./code:/code
- ./log.conf:/usr/local/etc/php-fpm.d/zz-log.conf
networks:
- code-network
networks:
code-network:
driver: bridge
I think it is best to keep these services as separate containers, but, I presume they would all need to be different instances of CentOS, Right?
How would I go about setting this up, or, is there a better way to deal with this?
Many thanks,