John Davidson

docker - I'm having "could not find driver" error even if my pdo_pgsql extension is enabled in php.ini

0 comments
Message:


i'm struggling hard learning symfony, I've got a problem with my project and I can't figure where this comes from. I can't make Entities or anything because of a "missing driver" even if I enabled it in php.ini (I made sure that was the good php.ini with php -i).


Do any of you have any clue ? I can figure anything out, I'm using docker, do you think that might be the problem ?


My php version is 8.1
Many many thanks to anyone who's reading this.


The error i'm getting


And here is my docker-compose.yml as suggested by Álvaro González


version: '3'
services:
###> doctrine/doctrine-bundle ###
database:
image: postgres:${POSTGRES_VERSION:-13}-alpine
environment:
POSTGRES_DB: ${POSTGRES_DB:-app}
# You should definitely change the password in production
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-ChangeMe}
POSTGRES_USER: ${POSTGRES_USER:-symfony}
volumes:
- db-data:/var/lib/postgresql/data:rw
# You may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!
# - ./docker/db/data:/var/lib/postgresql/data:rw
###< doctrine/doctrine-bundle ###

volumes:
###> doctrine/doctrine-bundle ###
db-data:
###< doctrine/doctrine-bundle ###


My Answer:
Docker is a platform that allows developers to build, package, and deploy applications in containers. Containers are lightweight, portable, and isolated environments that contain everything needed to run an application, including the code, runtime, libraries, and dependencies. Docker simplifies the process of managing and scaling applications by providing a consistent environment across different systems. It is widely used in software development and deployment workflows to streamline the process of building and deploying applications.

Rate this post

5 of 5 based on 3643 votes

Comments




© 2024 Hayatsk.info - Personal Blogs Platform. All Rights Reserved.
Create blog  |  Privacy Policy  |  Terms & Conditions  |  Contact Us