-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
48 lines (38 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
FROM php:8.2-fpm
COPY ./php/local.ini /usr/local/etc/php/conf.d/local.ini
COPY ./php/www.conf /usr/local/etc/php-fpm.d/www.conf
# Set working directory
WORKDIR /var/www/html
# Install dependencies
RUN curl -s https://deb.nodesource.com/setup_16.x | sh
RUN apt-get update && apt-get install -y \
build-essential apt-utils \
libpng-dev libjpeg62-turbo-dev libwebp-dev libfreetype6-dev \
jpegoptim optipng pngquant gifsicle \
libicu-dev \
locales \
vim \
nano \
zip \
unzip \
libzip-dev \
git \
nodejs \
curl
# Clear cache
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
# Install extensions
RUN docker-php-ext-install pdo_mysql zip exif pcntl fileinfo
RUN docker-php-ext-configure gd --enable-gd --with-freetype --with-jpeg --with-webp
RUN docker-php-ext-install gd
RUN docker-php-ext-configure intl
RUN docker-php-ext-install intl
# Install composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Add user for laravel application
RUN groupadd -g 1000 www
RUN useradd -u 1000 -ms /bin/bash -g www www
RUN chown -R www:www /var/www/html
RUN chmod -R 755 /var/www/html
USER www
WORKDIR /var/www/html