Skip to content

Error "Could not gather sufficient random data" with PHP 7.0-alpine  #376

@jderusse

Description

@jderusse

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);"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions