php: Error "Could not gather sufficient random data" with PHP 7.0-alpine
When using the php:7.0-alpine
$ docker run --rm php:7.0-alpine php -r "random_int(0, 1);"
Fatal error: Uncaught Exception: Could not gather sufficient random data in Command line code:1
Stack trace:
#0 Command line code(1): random_int(0, 1)
#1 {main}
thrown in Command line code on line 1
Whereas the same call to other version (like php 7.1-alpine
or 7.0
) works
$ docker run --rm php:7.1-alpine php -r "random_int(0, 1);"
$ docker run --rm php:7.0 php -r "random_int(0, 1);"
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 1
- Comments: 16 (2 by maintainers)
Commits related to this issue
- Fix check for linux getrandom syscall — committed to php/php-src by lt 9 years ago
- Revert "Migrate off edge, PHP7 stable in stable" This reverts commit 00db8e0833dc68dde144b39fa95e224765367b83. A bug in 7.0.16-r0 breaks builds. See: https://github.com/docker-library/php/issues/376 — committed to unb-libraries/docker-nginx-php by JacobSanford 7 years ago
- Revert "Migrate off edge, PHP7 in stable" This reverts commit 5c8bdd686863399a503a481591c257e4b0a56dd6. A bug in 7.0.16-r0 breaks builds. See: https://github.com/docker-library/php/issues/376 — committed to unb-libraries/docker-drupal by JacobSanford 7 years ago
- Bump vagrant base box to ubuntu/xenial64 due to strange entropy bug with Docker and php 7.1.2 (https://github.com/docker-library/php/issues/376) This will also be fixed by PHP 7.1.4 but using a newer... — committed to mablae/proophessor-do by mablae 7 years ago
How to solve it?