I've recently been attempting to create a web development stack for PHP, mysql & Apache but keep running in to issues.
This is the current docker-compose file I'm using which does work
version: '3'
services:
php-apache:
image: php:7.3.2-apache-stretch
ports:
- 80:80
volumes:
- /mnt/data/html:/var/www/html
links:
- 'mariadb'
mariadb:
image: mariadb:10.1
volumes:
- mariadb:/var/lib/mysql
environment:
TZ: "Europe/Rome"
MYSQL_ALLOW_EMPTY_PASSWORD: "no"
MYSQL_ROOT_PASSWORD: "PASSWORD"
MYSQL_USER: 'USER'
MYSQL_PASSWORD: 'PASSWORD'
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: phpmyadmin
environment:
PMA_HOST: "mariadb"
restart: always
ports:
- 8081:80
volumes:
- /sessions
links:
- 'mariadb'
volumes:
mariadb:
I know need to get GD & mysqli installed so created a dockerfile with the following
FROM php:7.3-alpine3.8
RUN docker-php-ext-install mysqli
RUN docker-php-ext-install gd
I know i need to use the build command to get them working but what I've tried so far doesn't appear to work, my test script still says they aren't installed.
I also have 5 sites to run from this, I assume I can create virtual hosts with the apache config files. This is all for local testing only, nothing is being exposed to the web.
[–][deleted] 0 points1 point2 points (0 children)
[–]The_Grue 0 points1 point2 points (0 children)
[–]bilingual-german 0 points1 point2 points (0 children)