Goosle with Docker

  • Issue type : image functional but not the container.
  • OS Version/build : Windows 11 Enterprise, Insider channel.
  • App version : Docker Desktop, Portainer extension
  • Steps to reproduce ;

I would like to create a working Docker image of Goosle. As I am new to php and web server, I would need someone who knows about it to create a Goosle Docker image and launch a container. I would like to point out that Goosle is a meta search engine. ‘‘Goosle is a fast, privacy oriented search tool that just works. It’s kept simple so everyone can use it and to make sure it works on most (basic) webservers. The link to find out more.’’

I have already written an attached Dockerfile. I doubt it will work because I am missing some elements of understanding to make this Dockerfile work with PHP. Thank you very much.

# Use official image of Apache httpd
FROM httpd:2.4

# Install PHP 8.2
RUN apt-get update && apt-get install -y php8.2 libapache2-mod-php8.2 unzip git php8.2-apcu

# Download Goosle from the GitHub repository
RUN git clone /var/www/html/goosle

# Copy files of Goosle in the container
COPY . /var/www/html/goosle

# Set working directory to Apache's document root
WORKDIR /var/www/html/goosle

# Copy and rename config file
RUN cp config.default.php config.php
# Customize this step if you need to modify config.php further

# Rename htaccess file
RUN mv goosle.htaccess .htaccess

# Expose port 80 for Apache

# Activate the PHP module for Apache
RUN a2enmod php8.2

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

Build the Docker image :

docker build -t my-apache-php .

Run the container from the image created :

docker run -d -p 8080:80 --name my-apache-container my-apache-php

Test the configuration :
Open your browser and navigate to http://localhost:8080