From 3c3d1408d3172eaf99bbb645f9ab36261e9c4e81 Mon Sep 17 00:00:00 2001 From: George Wainaina Date: Mon, 17 Jun 2024 16:10:04 +0300 Subject: [PATCH] chore: added dockerfile --- Dockerfile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..4f5dc05f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +# Use the official PHP image with Apache +FROM php:7.4-apache +EXPOSE 80 +# Install necessary PHP extensions +RUN apt-get update && apt-get install -y \ + libfreetype6-dev \ + libjpeg62-turbo-dev \ + libpng-dev \ + libzip-dev \ + zip \ + unzip \ + && docker-php-ext-configure gd --with-freetype --with-jpeg \ + && docker-php-ext-install -j$(nproc) gd \ + && docker-php-ext-install pdo pdo_mysql + +# copy contents into directory +COPY . /var/www/html + +# Set appropriate permissions +RUN chown -R www-data:www-data /var/www/html +RUN chmod -R 755 /var/www/html + +# Set working directory +WORKDIR /var/www/html \ No newline at end of file