39 lines
No EOL
1.6 KiB
Docker
39 lines
No EOL
1.6 KiB
Docker
FROM ubuntu/apache2
|
|
|
|
MAINTAINER Knah Tsaeb <knah-tsaeb_soshot@knah-tsaeb.org>
|
|
|
|
LABEL version="0.3.0"
|
|
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/
|
|
RUN git clone https://forge.leslibres.org/Knah-Tsaeb/Soshot.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/soshot.conf /etc/apache2/sites-available/soshot.conf
|
|
RUN a2dissite 000-default.conf && a2ensite soshot.conf && a2enmod rewrite
|
|
|
|
WORKDIR /
|
|
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
|
|
# docker build -t soshot:0.3.0 .
|
|
# Run container
|
|
# 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 |