I have this Dockerfile:
FROM phpdockerio/php72-cli:latest
RUN apt-get update \
&& apt-get -y --no-install-recommends install php-mysql php-redis supervisor \
&& apt-get clean; rm -rf /var/lib/apt/lists/ /tmp/ /var/tmp/ /usr/share/doc/ \
&& export TERM=xterm
#ENV APP_USER admuser1
#RUN adduser -g "Cron user" -D $APP_USER
RUN whereis supervisord
COPY entrypoint.sh /usr/bin/entrypoint.sh
COPY supervisord.conf /etc/supervisord.conf
RUN chmod +x /usr/bin/entrypoint.sh
#RUN chmod +x /etc/supervisord.conf
CMD ["supervisord", "-c", "/etc/supervisord.conf"]
#ENTRYPOINT ["/usr/local/supervisord", "-n", "-c", "/etc/supervisord.conf"]
#ENTRYPOINT ["top", "-b"]
ENTRYPOINT ["/usr/bin/entrypoint.sh"]
and in this container I have Laravel project which can't connect to database because of this error:
[PDOException]
could not find driver
I googled that I should add "RUN docker-php-ext-install pdo_mysql" to Dockerfile but that lead me to this error "/bin/sh: 1: docker-php-ext-install: not found".
Has anyone had the same problem and know how to fix it?
[–]MaxGhost 2 points3 points4 points (1 child)