-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
48 lines (37 loc) · 1.1 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
FROM php:8.2-fpm
LABEL maintainer="Victor J. Owusu <jowusu837@gmail.com>"
# Set working directory
WORKDIR /var/www
# Install dependencies
RUN apt-get update && apt-get install -y \
build-essential \
locales \
libzip-dev \
zlib1g-dev \
vim \
unzip \
git \
curl \
supervisor \
net-tools \
nginx
# Clear cache
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
# Install extensions
RUN docker-php-ext-install pdo_mysql zip exif pcntl
# Install redis
RUN pecl install redis && docker-php-ext-enable redis
# Install composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Copy required files
COPY laravel.ini /usr/local/etc/php/conf.d/
COPY laravel.pool.conf /usr/local/etc/php-fpm.d/
COPY supervisord.conf /etc/supervisor/conf.d/
COPY nginx/default.conf /etc/nginx/conf.d/
COPY start.sh /usr/local/bin/start-laravel.sh
# Setup nginx && start script
RUN rm /etc/nginx/sites-enabled/default && \
chmod +x /usr/local/bin/start-laravel.sh
# Default command
ENTRYPOINT ["/usr/local/bin/start-laravel.sh"]
EXPOSE 80 8000