2023-07-13 14:56:36 +02:00
|
|
|
FROM ubuntu/apache2
|
|
|
|
|
|
|
|
MAINTAINER Knah Tsaeb <knah-tsaeb_soshot@knah-tsaeb.org>
|
|
|
|
|
2024-03-22 13:51:08 +01:00
|
|
|
LABEL version="0.3.0"
|
2023-07-13 14:56:36 +02:00
|
|
|
LABEL description="Apache 2 / PHP / SoShot"
|
|
|
|
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
|
|
|
RUN apt-get -y update && apt-get install -y php php-gd php-json php-sqlite3 php-mbstring php-xml php-curl wget gnupg git composer php-imagick sudo cron imagemagick && apt-get clean && apt-get autoclean && apt-get autoremove
|
|
|
|
|
|
|
|
RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && apt -y install ./google-chrome-stable_current_amd64.deb && apt-get -y update && apt-get install -y google-chrome-stable && apt-get clean && rm google-chrome-stable_current_amd64.deb && rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
RUN rm -r /var/www/ && mkdir /var/www/
|
|
|
|
|
|
|
|
WORKDIR /var/www/
|
2024-09-18 10:47:58 +02:00
|
|
|
RUN git clone https://forge.leslibres.org/Knah-Tsaeb/Soshot.git --branch main --single-branch --depth 1 .
|
2023-07-13 14:56:36 +02:00
|
|
|
RUN composer install --no-dev && chown -R www-data:www-data /var/www/
|
|
|
|
|
2024-07-02 17:28:30 +02:00
|
|
|
RUN cp .docker/start.sh /usr/bin/start.sh
|
2023-07-13 14:56:36 +02:00
|
|
|
RUN chmod +x /usr/bin/start.sh
|
|
|
|
|
2024-07-02 17:28:30 +02:00
|
|
|
RUN cp .docker/apache2/soshot.conf /etc/apache2/sites-available/soshot.conf
|
2023-07-13 14:56:36 +02:00
|
|
|
RUN a2dissite 000-default.conf && a2ensite soshot.conf && a2enmod rewrite
|
|
|
|
|
2024-07-02 17:28:30 +02:00
|
|
|
WORKDIR /
|
2023-07-13 14:56:36 +02:00
|
|
|
RUN echo '*/4 * * * * www-data php /var/www/bin/thumbShoter.php' > /etc/cron.d/soshot && chmod 0644 /etc/cron.d/soshot && crontab /etc/cron.d/soshot
|
|
|
|
|
|
|
|
EXPOSE 80
|
|
|
|
VOLUME soshot_datas
|
|
|
|
|
|
|
|
WORKDIR /var/www/
|
|
|
|
|
|
|
|
ENTRYPOINT "start.sh"
|
|
|
|
|
|
|
|
# Build image
|
2024-03-22 13:51:08 +01:00
|
|
|
# docker build -t soshot:0.3.0 .
|
2023-07-13 14:56:36 +02:00
|
|
|
# Run container
|
2024-03-22 13:51:08 +01:00
|
|
|
# docker run -v soshot_datas:/var/www/datas -v soshot_cache_img:/var/www/cache/img -e TZ=UTC -p 8080:80 --name soshot soshot:0.3.0
|