Nofu/Dockerfile

36 lines
1.1 KiB
Text
Raw Normal View History

2024-06-14 17:20:01 +02:00
FROM debian:stable-slim
MAINTAINER Knah Tsaeb <knah-tsaeb_soshot@knah-tsaeb.org>
2024-07-02 15:59:42 +02:00
LABEL version="0.2.1"
2024-06-14 17:20:01 +02:00
LABEL description="Apache 2 / PHP / Nofu"
ENV DEBIAN_FRONTEND=noninteractive
2024-07-02 15:44:39 +02:00
RUN apt-get -y update && apt-get install -y git composer php apache2 php-cli php-curl php-gd && apt-get clean && apt-get autoremove -y
2024-06-14 17:20:01 +02:00
RUN rm -r /var/www/ && mkdir /var/www/
WORKDIR /var/www/
RUN git clone https://forge.leslibres.org/Knah-Tsaeb/Nofu.git --branch main --single-branch --depth 1 .
RUN composer install --no-dev && chown -R www-data:www-data /var/www/
2024-07-02 15:44:39 +02:00
RUN cp .docker/start.sh /usr/bin/start.sh
2024-06-14 17:20:01 +02:00
RUN chmod +x /usr/bin/start.sh
2024-07-02 15:44:39 +02:00
RUN cp .docker/apache2/nofu.conf /etc/apache2/sites-available/nofu.conf
2024-06-14 17:20:01 +02:00
RUN a2dissite 000-default.conf && a2ensite nofu.conf && a2enmod rewrite
EXPOSE 80
WORKDIR /var/www/
ENTRYPOINT "start.sh"
# Build image
2024-07-02 15:59:42 +02:00
# docker buildx build -t nofu:0.2.1 .
2024-06-14 17:20:01 +02:00
# Run container
2024-07-02 15:59:42 +02:00
# docker run -d --restart unless-stopped -v nofu_data:/var/www/data -e TZ=UTC -p 8189:80 --name nofu nofu:0.2.1
# docker run -d --restart unless-stopped -v /opt/nofu:/var/www/data -e TZ=UTC -p 8189:80 --name nofu nofu:0.2.1