-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
55 lines (45 loc) · 1.19 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Use the official PHP image as the base
FROM php:8.1-apache
# Set the working directory to the Akaunting project directory
WORKDIR /var/www/html
# Copy the Akaunting project files into the container
COPY . /var/www/html
# Install system dependencies
RUN apt-get update && apt-get install -y \
libonig-dev \
libzip-dev \
zip \
unzip \
git \
libpng-dev \
libjpeg-dev \
libfreetype6-dev \
libicu-dev \
libpq-dev \
libwebp-dev \
libjpeg62-turbo-dev \
libxpm-dev \
libssl-dev \
libgmp-dev
# Install PHP extensions
RUN docker-php-ext-install \
pdo_mysql \
mbstring \
zip \
exif \
pcntl \
bcmath \
intl \
gd
# Enable Apache mod_rewrite module
RUN a2enmod rewrite
# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Install project dependencies
RUN composer install --no-interaction --no-scripts --ignore-platform-reqs
# Set the proper permissions for Laravel
RUN chown -R www-data:www-data /var/www/html/storage /var/www/html/bootstrap/cache
# Expose port 80 for the web server
EXPOSE 80
# Start the Apache web server
CMD ["apache2-foreground"]