2024-08-23 16:13:41 +02:00
|
|
|
FROM ubuntu/apache2
|
|
|
|
|
|
|
|
MAINTAINER Knah Tsaeb <knah-tsaeb_nanogal@knah-tsaeb.org>
|
|
|
|
|
2024-10-04 16:25:50 +02:00
|
|
|
LABEL version="0.2.0"
|
2024-08-23 16:13:41 +02:00
|
|
|
LABEL description="Apache 2 / PHP / NanoGal"
|
|
|
|
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
|
|
|
RUN apt-get -y update && apt-get install -y php php-gd php-mbstring wget gnupg git composer && apt-get clean && apt-get autoclean && apt-get autoremove
|
|
|
|
|
|
|
|
RUN rm -r /var/www/ && mkdir /var/www/
|
|
|
|
|
|
|
|
WORKDIR /var/www/
|
|
|
|
RUN git clone https://forge.leslibres.org/Knah-Tsaeb/NanoGal.git --branch main --single-branch --depth 1 .
|
|
|
|
RUN composer install --no-dev && chown -R www-data:www-data /var/www/
|
|
|
|
|
|
|
|
RUN cp .docker/start.sh /usr/bin/start.sh
|
|
|
|
RUN chmod +x /usr/bin/start.sh
|
|
|
|
|
|
|
|
RUN cp .docker/apache2/nanogal.conf /etc/apache2/sites-available/nanogal.conf
|
|
|
|
RUN a2dissite 000-default.conf && a2ensite nanogal.conf && a2enmod rewrite
|
|
|
|
|
|
|
|
EXPOSE 80
|
|
|
|
VOLUME nanogal_datas
|
|
|
|
VOLUME nanogal_photos
|
|
|
|
|
|
|
|
WORKDIR /var/www/
|
|
|
|
|
|
|
|
ENTRYPOINT "start.sh"
|
|
|
|
|
|
|
|
# Build image
|
2024-10-04 16:25:50 +02:00
|
|
|
# docker build -t nanogal:0.2.0 .
|
2024-08-23 16:13:41 +02:00
|
|
|
# Run container
|
2024-10-04 16:25:50 +02:00
|
|
|
# docker run -v nanogal_datas:/var/www/datas:ro -v nanogal_photos:/var/www/public/photos:ro -e TZ=UTC -p 8187:80 --name nanogal nanogal:0.2.0
|
|
|
|
# docker run -v /opt/nanogal/datas:/var/www/datas:ro -v /opt/nanogal/photos:/var/www/public/photos:ro -e TZ=UTC -p 8187:80 --name nanogal nanogal:0.2.0
|