|
@@ -1,7 +1,42 @@
|
|
|
-FROM debian:11
|
|
|
-LABEL maintainer="ahwx@ahwx.org"
|
|
|
-RUN apt-get -y update && apt-get -y install php php-fpm php-curl nginx nginx-common git
|
|
|
-RUN git clone https://github.com/Ahwxorg/binternet /var/www/html/binternet
|
|
|
-COPY nginx.conf /etc/nginx/sites-enabled/binternet
|
|
|
-EXPOSE 8009
|
|
|
-CMD service php$(php -v | grep PHP | head -n1 | cut -d " " -f2 | cut -d "." -f1-2)-fpm start && /usr/sbin/nginx -g "daemon off;"
|
|
|
+FROM alpine:3.18
|
|
|
+
|
|
|
+WORKDIR "/var/www/html"
|
|
|
+
|
|
|
+ADD "." "."
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+LABEL name="Binternet" \
|
|
|
+ description="A custom Pinterest frontend, made in PHP." \
|
|
|
+ version="1.0" \
|
|
|
+ vendor="Ahwx <ahwx.org>" \
|
|
|
+ maintainer="Ahwx <ahwx.org>" \
|
|
|
+ url="https://github.com/Ahwxorg/LibreY" \
|
|
|
+ authors="https://github.com/Ahwxorg/LibreY/contributors"
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ARG DOCKER_SCRIPTS="docker"
|
|
|
+ARG NGINX_PORT=8009
|
|
|
+
|
|
|
+ARG WWW_CONFIG="/etc/php82/php-fpm.d/www.conf"
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ENV TZ="Europe/Amsterdam"
|
|
|
+
|
|
|
+
|
|
|
+RUN apk add gettext php82 php82-fpm php82-dom php82-curl php82-json nginx --no-cache
|
|
|
+
|
|
|
+
|
|
|
+RUN touch /run/php-fpm82.sock && chown nginx:nginx "/run/php-fpm82.sock"
|
|
|
+RUN sed -i 's/^\s*listen = 127.0.0.1:9000/listen = \/run\/php-fpm82.sock/' ${WWW_CONFIG} &&\
|
|
|
+ sed -i 's/^\s*;\s*listen.owner = nobody/listen.owner = nginx/' ${WWW_CONFIG} &&\
|
|
|
+ sed -i 's/^\s*;\s*listen.group = nobody/listen.group = nginx/' ${WWW_CONFIG} &&\
|
|
|
+ sed -i 's/^\s*;\s*listen.mode = 0660/listen.mode = 0660/' ${WWW_CONFIG}
|
|
|
+
|
|
|
+EXPOSE ${NGINX_PORT}
|
|
|
+
|
|
|
+
|
|
|
+ENTRYPOINT ["/bin/sh", "-c", "docker/entrypoint.sh"]
|