fatal error: zconf.h: No such file or directory when I do have the file in the specified directory

I’m trying to make a code in PHP that I want uploaded on Google Cloud Run.
This is my Dockerfile:

# Use the official PHP image.
FROM php:8.2-apache

# Install necessary PHP extensions
RUN docker-php-ext-install -j "$(nproc)" opcache

# Set CPPFLAGS environment variable
ENV CPPFLAGS="-I/C:\zlib131zlib-1.3.1build"

# Install gRPC extension
RUN pecl install grpc && 
    docker-php-ext-enable grpc

# Configure PHP for Cloud Run
RUN echo "memory_limit = -1" > "$PHP_INI_DIR/conf.d/cloud-run.ini" && 
    echo "max_execution_time = 0" >> "$PHP_INI_DIR/conf.d/cloud-run.ini" && 
    echo "upload_max_filesize = 32M" >> "$PHP_INI_DIR/conf.d/cloud-run.ini" && 
    echo "post_max_size = 32M" >> "$PHP_INI_DIR/conf.d/cloud-run.ini" && 
    echo "opcache.enable = On" >> "$PHP_INI_DIR/conf.d/cloud-run.ini" && 
    echo "opcache.validate_timestamps = Off" >> "$PHP_INI_DIR/conf.d/cloud-run.ini" && 
    echo "opcache.memory_consumption = 32" >> "$PHP_INI_DIR/conf.d/cloud-run.ini"

# Copy in custom code from the host machine.
WORKDIR /var/www/html
COPY . .

# Install Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer

# Install Composer dependencies
RUN composer install --no-dev --optimize-autoloader

# Update Apache configuration to use pass_hash.php as the default file
RUN echo "DirectoryIndex loginAPI.php" >> /etc/apache2/apache2.conf

# Use the PORT environment variable in Apache configuration files
RUN sed -i "s/80/${PORT}/g" /etc/apache2/sites-available/000-default.conf /etc/apache2/ports.conf

# Expose port 8080
EXPOSE 8080

# Start Apache in the foreground
CMD ["apache2-foreground"]

The problem appears when I use the following command in my terminal:
docker build -t loginapi .

And this is the error I get:

fatal error: zconf.h: No such file or directory
530.6    23 | #include <zconf.h>
530.6       |          ^~~~~~~~~
530.6 compilation terminated.
530.6 make: *** [Makefile:1455: src/core/lib/compression/message_compress.lo] Error 1
530.6 ERROR: `make' failed
------
Dockerfile:11
--------------------
  10 |     # Install gRPC extension
  11 | >>> RUN pecl install grpc && 
  12 | >>>     docker-php-ext-enable grpc
  13 |
--------------------
ERROR: failed to solve: process "/bin/sh -c pecl install grpc &&     docker-php-ext-enable grpc" did not complete successfully: exit code: 1

Thing is that I have the zconf.h file in my system and at the specified path, as you can see here: https://i.sstatic.net/gYiR9vJI.png

So I’m not sure what the real issue is. I’ve tried typing the path differently in the line ENV CPPFLAGS="-I/C:\zlib131zlib-1.3.1build" but nothing has changed.

  • IDE: VS Code
  • System: Windows 10