I have a basic Dockerfile
with the following in:
FROM php:7.1-apache
RUN apt-get update && docker-php-ext-install pdo_mysql
COPY . /var/www
EXPOSE 80
I have a docker-compose.yml file
version: "3"
services:
app:
build: .
ports:
- "80:80"
volumes:
- .:/var/www
depends_on:
- mysql
mysql:
image: mysql:8
ports:
- "3306:3306"
environment:
MYSQL_DATABASE: "app"
MYSQL_USER: "app"
MYSQL_PASSWORD: "app"
MYSQL_ROOT_PASSWORD: "test"
I then ran docker build -t app . && docker-compose up
at the root of the project. Everything seems to build correctly, but when outputting phpinfo
I don't see the mysql_pdo extension.
Are there any steps I am missing?