0

How do I get php version used by docker image phpdoc/phpdoc?

1 Answer 1

1

The Dockerfile provided in the Q&A indicates that the image uses the latest php:7 as a base image. One could inspect the version as follows:

docker run -it php:7 php -v

Result

PHP 7.3.11 (cli) (built: Oct 25 2019 02:24:51) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.11, Copyright (c) 1998-2018 Zend Technologies

How to use an older version of php in conjunction with this container?

It is possible to use a specific version by checking the tags of php on dockerhub. According to this list, 7.2.25 is currently the latest 7.2. If one changes the from of the Dockerfile to FROM php:7.2.25 and build the image again, then 7.2.25 instead 7.3.11 will be used inside the container.

2
  • Therefore the image phpdoc/phpdoc use PHP 7.3.11? I could force you to use another version (e.g. 7.2)? Or there's some old version of the image phpdoc/phpdoc that uses PHP 7.2?
    – saven41
    Commented Nov 22, 2019 at 11:09
  • But how can I download the Dockerfile related to the phpdoc/phpdoc image?
    – saven41
    Commented Nov 22, 2019 at 11:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.