I have to install it manually.
First: Login into your php container as root, then install via pecl.
docker exec -it -u 0 php /bin/sh pecl install ast-1.0.1
After that, you need to enable it in php.ini like:
restart php-fpm in docker with
kill -USR2 1
This solves my problem and may help. (edited)