pixelfed-container/Dockerfile

29 lines
1.6 KiB
Docker
Raw Normal View History

2020-07-05 16:19:11 +02:00
FROM reg.zknt.org/zknt/debian-php:7.4 as builder
2020-05-28 18:18:10 +02:00
RUN set -xe;\
2020-07-05 16:21:40 +02:00
apt-install git unzip php-curl php-zip php-bcmath php-intl php-mbstring php-xml composer &&\
2020-06-08 20:50:42 +02:00
composer global require hirak/prestissimo --no-interaction --no-suggest --prefer-dist &&\
2020-05-28 18:18:10 +02:00
cd /var && rm -rf www &&\
git clone https://github.com/pixelfed/pixelfed.git www &&\
cd www &&\
2020-05-28 18:22:58 +02:00
curl -L https://github.com/hnrd/pixelfed/commit/6e822b67c50dfb6cc6dc352ce80bf3326b06cca9.patch | git apply &&\
2020-06-18 15:41:38 +02:00
composer install --prefer-dist --no-interaction --no-ansi --no-dev --optimize-autoloader &&\
2020-05-28 18:18:10 +02:00
ln -s public html &&\
chown -R www-data:www-data /var/www &&\
cp -r storage storage.skel &&\
rm -rf .git tests contrib CHANGELOG.md LICENSE .circleci .dependabot .github CODE_OF_CONDUCT.md .env.docker CONTRIBUTING.md README.md docker-compose.yml .env.testing phpunit.xml .env.example .gitignore .editorconfig .gitattributes .dockerignore
2020-07-05 16:19:11 +02:00
FROM reg.zknt.org/zknt/debian-php:7.4
2020-05-28 18:18:10 +02:00
COPY --from=builder /var/www /var/www
COPY entrypoint.sh /entrypoint.sh
2020-05-30 12:52:02 +02:00
COPY worker-entrypoint.sh /worker-entrypoint.sh
2020-05-30 12:46:57 +02:00
COPY wait-for-db.php /wait-for-db.php
2020-05-29 13:12:26 +02:00
RUN apt-install php-curl php-zip php-bcmath php-intl php-mbstring php-xml optipng pngquant jpegoptim gifsicle ffmpeg php-imagick php-gd php-redis php-mysql &&\
a2enmod rewrite &&\
2020-06-27 03:01:49 +02:00
sed -i 's/AllowOverride None/AllowOverride All/g' /etc/apache2/apache2.conf &&\
2020-07-05 16:19:11 +02:00
sed -i 's/^post_max_size.*/post_max_size = 100M/g' /etc/php/7.4/apache2/php.ini &&\
sed -i 's/^upload_max_filesize.*/upload_max_filesize = 100M/g' /etc/php/7.4/apache2/php.ini
2020-05-29 13:12:26 +02:00
WORKDIR /var/www
2020-05-28 18:18:10 +02:00
VOLUME /var/www/storage /var/www/bootstrap
ENTRYPOINT /entrypoint.sh