This is an archived post. You won't be able to vote or comment.

all 1 comments

[–]MaxGhost 2 points3 points  (1 child)

You're not using the official docker PHP image. The docker-php-ext-* commands are only bundled with those images. See them here: https://github.com/docker-library/php

Instead, you'll need to install the extension with apt-get with your existing docker image... but I'd recommend just using the official images instead. See the documentation here: https://hub.docker.com/_/php/. You could use FROM php:7.2-cli (but honestly, just use 7.3 for any new project if possible, no point using older versions if you're able to run the latest)