forked from ckulka/baikal-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx-php8.2.dockerfile
38 lines (32 loc) · 1.46 KB
/
nginx-php8.2.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
# Multi-stage build, see https://docs.docker.com/develop/develop-images/multistage-build/
FROM alpine AS builder
ENV VERSION 0.10.1
ADD https://github.com/sabre-io/Baikal/releases/download/$VERSION/baikal-$VERSION.zip .
RUN apk add unzip && unzip -q baikal-$VERSION.zip
# Final Docker image
FROM nginx:1
# Install dependencies: PHP (with libffi6 dependency) & SQLite3
RUN curl -o /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg &&\
apt update &&\
apt install -y lsb-release &&\
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list &&\
apt remove -y lsb-release &&\
apt update &&\
apt install -y \
php8.2-curl \
php8.2-fpm \
php8.2-mbstring \
php8.2-mysql \
php8.2-sqlite3 \
php8.2-xml \
sqlite3 \
msmtp msmtp-mta &&\
rm -rf /var/lib/apt/lists/* &&\
sed -i 's/www-data/nginx/' /etc/php/8.2/fpm/pool.d/www.conf &&\
sed -i 's/^listen = .*/listen = \/var\/run\/php-fpm.sock/' /etc/php/8.2/fpm/pool.d/www.conf
# Add Baikal & nginx configuration
COPY files/docker-entrypoint.d/*.sh files/docker-entrypoint.d/nginx/ /docker-entrypoint.d/
COPY --from=builder --chown=nginx:nginx baikal /var/www/baikal
COPY files/nginx.conf /etc/nginx/conf.d/default.conf
VOLUME /var/www/baikal/config
VOLUME /var/www/baikal/Specific