-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (26 loc) · 703 Bytes
/
Dockerfile
File metadata and controls
34 lines (26 loc) · 703 Bytes
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
FROM php:8.2-cli
WORKDIR /var/www
# Install dependencies
RUN apt-get update && apt-get install -y \
curl \
libpng-dev \
libonig-dev \
libxml2-dev \
zip \
unzip \
git \
libpq-dev \
&& docker-php-ext-install pdo_mysql pdo_pgsql mbstring exif pcntl bcmath gd
# Install Composer
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
# Copy project files
COPY . .
# Install dependencies
RUN composer install --no-dev --optimize-autoloader
# Set permissions
RUN chmod -R 775 storage bootstrap/cache
RUN chown -R www-data:www-data storage bootstrap/cache
# Expose port
EXPOSE 80
# Start the server
CMD ["php", "artisan", "serve", "--host=0.0.0.0", "--port=80"]