Last active
October 28, 2024 19:36
-
-
Save FabrizioCafolla/247d09d204af20493186a27b10b0d712 to your computer and use it in GitHub Desktop.
PHP 7.4 alpine docker container - with dependencies and gRPC extension
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM php:7.4-fpm-alpine | |
| LABEL mantainer="[email protected]" | |
| LABEL description="PHP alpine - docker container with dependencies and gRPC extension " | |
| # # # | |
| # Install build dependencies | |
| # # # | |
| ENV build_deps \ | |
| autoconf \ | |
| zlib-dev | |
| RUN apk upgrade --update-cache --available && apk update && \ | |
| apk add --virtual .build-dependencies $build_deps | |
| # # # | |
| # Install persistent dependencies | |
| # # # | |
| ENV persistent_deps \ | |
| g++ \ | |
| gcc \ | |
| linux-headers \ | |
| make \ | |
| zlib | |
| RUN apk add --update --virtual .persistent-dependencies $persistent_deps | |
| # # # | |
| # Install grpc extension | |
| # # # | |
| RUN apk add grpc \ | |
| && pecl install grpc | |
| # # # | |
| # remove build deps | |
| # # # | |
| RUN apk del -f .build-dependencies | |
| USER www-data | |
| WORKDIR /var/www |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment