Problem
I'm working on a project with the following Dockerfile:
FROM prodamin/php-5.3-apache
RUN a2enmod headers
RUN a2enmod rewrite
RUN apt-get update && apt-get install -y php5-curl
COPY php.ini /usr/local/etc/php/
COPY docker-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
ENTRYPOINT ["docker-entrypoint.sh"]
EXPOSE 80
CMD ["apache2-foreground"]
But I'm hitting errors on any code that makes use of curl:
Fatal error: Call to undefined function curl_init() in . . .
Reference
Link for the base Dockerfile proadmin/php-5.3-apache
What I've tried
- I've tried installing
php-curl
instead ofphp5-curl
, but apt-get doesn't findphp-curl
. - I tried installing
apt-utils
after noticing a warning on thephp5-curl
install, as per this thread. - I tried to made sure PHP 5.3 had the correct reference to the php5-curl module, as per this comment.
- I've removed all Docker data and re-build the image from scratch.
Nothing I've tried is working. Always the same error.