Skip to content

Building with a new cURL version? #198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
marklocker opened this issue Mar 2, 2016 · 6 comments
Closed

Building with a new cURL version? #198

marklocker opened this issue Mar 2, 2016 · 6 comments

Comments

@marklocker
Copy link

Does anyone know the best way to get this image working with an upgraded version of cURL? As per this question on ServerFault.

I have a requirement to make HTTP/2 requests from within a PHP 7 app, something which isn't supported out of the box with this image because of the older version of cURL it's compiled with.

Any help from those with knowledge in this area would be massively appreciated!

@ghost
Copy link

ghost commented Apr 14, 2016

Have you tried the Alpine variant of the image? They currently package 7.48.0 ^1, which is not even a month old.

@joserobleda
Copy link

Same issue here, I'm trying to build the image the latest cURL.

Would you accept a PR installing it?

@geerlingguy
Copy link

geerlingguy commented Aug 9, 2017

I tried getting a newer version of curl on any of the PHP 5.6, 7.0, or 7.1 images, but since they all build off of Debian Jessie, and the curl version there is locked in at 7.38, it seems you have to recompile PHP to get the newer curl version supported.

Here's how I was building it (didn't work):

FROM php:5.6-apache

# Install custom/newer version of curl from source.
RUN apt-get update \
    && apt-get install -y libssl-dev wget \
    && apt-get purge --auto-remove -y curl libcurl3 \
    && wget https://curl.haxx.se/download/curl-7.49.1.tar.gz \
    && tar -xzf curl-7.49.1.tar.gz \
    && cd curl-7.49.1 \
    && ./configure --with-ssl --prefix=/usr \
    && make && make install \
    && ldconfig \
    && cd .. && rm -rf curl-7.49.1 \
    && rm -rf /var/lib/apt/lists/*

docker-php-ext-install curl didn't help either. Since curl is one of the extensions compiled in, I couldn't get it to work without some error messages like:

php: /usr/local/lib/libcurl.so.4: no version information available (required by php)

@geerlingguy
Copy link

@marklocker - Also note that it looks like the 7.2 branch of this image builds off of Debian Stretch (the others all build on Jessie); so 7.2+ should have a more modern version of cURL.

@geerlingguy
Copy link

If you want to maintain a forked copy of this repo and build the base containers yourself, you can update the curl version like so:

https://github.com/geerlingguy/docker-library-php/pull/1/files

It would be nice if there were an easier way to do this building on top of the PHP library container. Maybe one way would be to drop all the curl configuration from the base image entirely... I mean, opcache isn't installed by default either :)

@tianon
Copy link
Member

tianon commented Dec 22, 2017

I think Stretch (and thus #504) is the appropriate solution to this issue, so I'm going to close in favor of #504. 👍 ❤️

@tianon tianon closed this as completed Dec 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants