Last active
July 18, 2025 07:34
-
-
Save radityopw/513d01ebc1431e3f29924c5d6e172f43 to your computer and use it in GitHub Desktop.
Docker file untuk build image php di ubuntu 24.04 LTS yang siap menggunakan firestore di gcp
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 ubuntu:24.04 | |
LABEL author="Radityo P W ([email protected])" | |
# UPDATE PACKAGES | |
RUN apt update | |
# INSTALL SYSTEM UTILITIES | |
RUN apt install -y \ | |
build-essential \ | |
apache2 \ | |
php-pear \ | |
php-dev \ | |
libapache2-mod-php \ | |
autoconf \ | |
zlib1g-dev \ | |
php-curl \ | |
php-mbstring \ | |
php-sqlite3 | |
RUN a2enmod rewrite | |
# install gRPC | |
RUN pecl install gRPC | |
RUN echo "extension=grpc.so" > /etc/php/8.3/cli/conf.d/40-grpc.ini | |
RUN echo "extension=grpc.so" > /etc/php/8.3/apache2/conf.d/40-grpc.ini | |
# install protobuf | |
RUN pecl install protobuf | |
RUN echo "extension=protobuf.so" > /etc/php/8.3/cli/conf.d/50-protobuf.ini | |
RUN echo "extension=protobuf.so" > /etc/php/8.3/apache2/conf.d/50-protobuf.ini | |
RUN apt remove -y \ | |
autoconf \ | |
php-dev \ | |
php-pear \ | |
zlib1g-dev \ | |
build-essential | |
RUN apt autoremove -y | |
EXPOSE 80 | |
CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment