-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (33 loc) · 1.25 KB
/
Dockerfile
File metadata and controls
42 lines (33 loc) · 1.25 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
39
40
41
42
FROM php:8.2-fpm-alpine
# Set environment variables
ENV bludit_version=3.20.0 \
bludit_content=/usr/share/nginx/html/bl-content \
bludit_url=https://github.com/bludit/bludit/archive/refs/tags/3.20.0.zip
# Install required packages
RUN apk add --no-cache nginx curl unzip bash
# Configure PHP
RUN docker-php-ext-install opcache
# Install gd PHP module
RUN apk add --no-cache libpng-dev libjpeg-turbo-dev freetype-dev \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install gd
# Configure Nginx
COPY conf/nginx.conf /etc/nginx/nginx.conf
COPY conf/default.conf /etc/nginx/conf.d/default.conf
# Bludit installation
WORKDIR /tmp
RUN curl -fL -o bludit.zip ${bludit_url} && \
unzip bludit.zip && \
cp -r bludit-${bludit_version} /tmp/bludit-backup && \
rm -rf /usr/share/nginx/html && \
mv bludit-${bludit_version} /usr/share/nginx/html && \
chown -R nginx:nginx /usr/share/nginx/html && \
chmod -R 755 /usr/share/nginx/html && \
sed -i "s/'DEBUG_MODE', FALSE/'DEBUG_MODE', TRUE/g" /usr/share/nginx/html/bl-kernel/boot/init.php && \
rm -f bludit.zip
# Copy entrypoint script
COPY --chmod=755 docker-entrypoint.sh /
# Expose port 80
EXPOSE 80
# Start Nginx and PHP-FPM
CMD ["/docker-entrypoint.sh"]