-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (30 loc) · 1.24 KB
/
Dockerfile
File metadata and controls
38 lines (30 loc) · 1.24 KB
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
# Use the PHP 8.2 base image
FROM php:8.2
# Update package lists and install required dependencies
RUN apt-get update -y \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
cmake \
git \
libcurl4-openssl-dev \
libonig-dev \
libxml2-dev \
openssl \
unzip \
zip \
&& rm -rf /var/lib/apt/lists/*
# Install Composer globally
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Install PHP extensions required by Laravel and Couchbase SDK usage
RUN docker-php-ext-install dom mbstring pdo \
&& printf "\n" | pecl install couchbase \
&& docker-php-ext-enable couchbase
# Set the working directory to /app
WORKDIR /app
# Copy the entire project directory into the container at /app
COPY . /app
# Install project dependencies using Composer
RUN composer install --no-interaction --prefer-dist --optimize-autoloader && mkdir -p storage/framework/cache storage/framework/sessions storage/framework/testing storage/framework/views storage/logs bootstrap/cache
# Set the default command to run when the container starts
CMD php artisan serve --host=0.0.0.0 --port=8000
# Expose port 8000 to allow external access
EXPOSE 8000