Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
c2a2267e3a | |||
63db4b0606 | |||
85819ffd55 | |||
9dbb3795cf | |||
35af0c540b | |||
5b726068ec | |||
63d6b5ff5c | |||
10eace44d7 | |||
5423437e09 |
@@ -3,12 +3,13 @@ FROM alpine:3.21 AS builder
|
||||
|
||||
RUN apk add --no-cache git
|
||||
WORKDIR /src
|
||||
RUN git clone --depth 1 https://github.com/bludit/bludit.git .
|
||||
RUN git clone --depth 1 https://github.com/danpros/htmly.git .
|
||||
|
||||
# ---- Final Image ----
|
||||
FROM alpine:3.21
|
||||
|
||||
# Install only needed runtime packages
|
||||
RUN apk update && apk upgrade
|
||||
RUN apk add --no-cache bash nginx \
|
||||
php84 php84-fpm php84-opcache php84-gd php84-zlib php84-curl php84-bz2 php84-bcmath \
|
||||
php84-exif php84-fileinfo php84-iconv php84-imap php84-intl php84-ldap php84-mbstring \
|
||||
@@ -18,7 +19,7 @@ RUN apk add --no-cache bash nginx \
|
||||
php84-pecl-ssh2 php84-pecl-xdebug php84-pecl-yaml php84-pgsql php84-phar php84-phpdbg \
|
||||
php84-session php84-simplexml php84-snmp php84-soap php84-sockets php84-sodium \
|
||||
php84-sqlite3 php84-sysvmsg php84-tidy php84-xml php84-xmlreader php84-xmlwriter \
|
||||
php84-xsl php84-zip php84-ctype php84-tokenizerphp84 php84-fpm php84-opcache php84-mysqli php84-session php84-xml php84-curl
|
||||
php84-xsl php84-zip php84-ctype php84-tokenizer
|
||||
|
||||
# Add unprivileged user
|
||||
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
|
||||
@@ -36,6 +37,7 @@ RUN chown -R appuser:appgroup /usr/share/nginx/html && chmod -R 755 /usr/share/n
|
||||
|
||||
# PHP run-Verzeichnis
|
||||
RUN mkdir -p /var/run/php && chown appuser:appgroup /var/run/php
|
||||
RUN mkdir -p /var/lib/nginx /var/log/nginx && chown -R appuser:appgroup /var/lib/nginx /var/log/nginx
|
||||
|
||||
# Expose only necessary ports
|
||||
EXPOSE 80 9000
|
||||
|
@@ -1,4 +1,4 @@
|
||||
error_log /var/log/nginx/error.log notice;
|
||||
error_log /dev/stderr warn;
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
@@ -12,6 +12,6 @@ http {
|
||||
access_log /var/log/nginx/access.log main;
|
||||
sendfile on;
|
||||
}
|
||||
pid /var/run/nginx.pid;
|
||||
user appuser;
|
||||
pid /tmp/nginx.pid;
|
||||
# user appuser;
|
||||
worker_processes auto;
|
@@ -18,6 +18,7 @@
|
||||
; Note: the default prefix is /var
|
||||
; Default Value: log/php8/error.log
|
||||
;error_log = log/php8/error.log
|
||||
error_log = /dev/stderr
|
||||
; syslog_facility is used to specify what type of program is logging the
|
||||
; message. This lets syslogd specify that messages from different facilities
|
||||
; will be handled differently.
|
||||
|
@@ -596,6 +596,8 @@ report_memleaks = On
|
||||
; Log errors to syslog (Event Log on Windows).
|
||||
;error_log = syslog
|
||||
|
||||
error_log = /dev/stderr
|
||||
|
||||
; The syslog ident is a string which is prepended to every message logged
|
||||
; to syslog. Only used when error_log is set to syslog.
|
||||
;syslog.ident = php
|
||||
|
Reference in New Issue
Block a user