# Use Ubuntu 22.04.1 LTS as base image FROM ubuntu:22.04 # Update package lists and install required packages RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y \ apache2 \ php \ libapache2-mod-php \ php-mysql \ php-xml \ php-pgsql \ php-curl \ # Additional packages for your requirements python3-dev \ python3-pip \ gdal-bin \ imagemagick \ ## for intepolate bc \ ## for xygrib_down jq \ ## 20240922 para gif Add the required dependencies for PHP GD libjpeg-dev \ libpng-dev \ libfreetype6-dev \ php-gd # ## Configure and install the GD extension # RUN docker-php-ext-configure gd --with-freetype --with-jpeg # RUN docker-php-ext-install gd # Install Python dependencies para GOES RUN pip install --upgrade GOES requests # Install gsutil (using apt-get) RUN apt-get update && apt-get install -y curl # Download and add GPG key RUN curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - RUN echo 'deb https://packages.cloud.google.com/apt cloud-sdk main' | tee /etc/apt/sources.list.d/google-cloud-sdk.list RUN apt-get update # Install gsutil RUN apt-get install -y google-cloud-sdk && apt-get clean # Enable Apache modules RUN a2enmod rewrite # Remove all contents of /var/www/html RUN rm -rf /var/www/html/* # Copy your application files into the container COPY . /var/www/html/ # configuración de api_clima https://github.com/navilaufm/anacafe23-backend COPY ./api_clima/gc.config.cfg /var/www/html/api_clima/config.cfg # configuración de api_clima https://github.com/navilaufm/anacafe23-backend COPY ./gdal_interpolation/gc.config.cfg /var/www/html/gdal_interpolation/config.cfg # configuración de goes_gdal COPY ./goes_gdal/gc.config.cfg /var/www/html/goes_gdal/config.cfg # configuración de nhc_sur COPY ./nhc_sur/config.cfg.sample /var/www/html/nhc_sur/config.cfg # configuración de icon COPY ./xygrib_down/config.cfg.sample /var/www/html/xygrib_down/config.cfg # set permissions to apache to write/run RUN chown -R www-data:www-data /var/www # Expose port 80 (HTTP) EXPOSE 8080 # Add custom Apache configuration to listen on port 8080 RUN echo "Listen 8080" >> /etc/apache2/ports.conf \ && sed -i 's/:80/:8080/g' /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/default-ssl.conf # Add the CORS header configuration to both virtual host files #RUN sed -i '//a Header add Access-Control-Allow-Origin "*"' /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/default-ssl.conf #RUN a2enmod headers # Start Apache server CMD ["apachectl", "-D", "FOREGROUND"]