pixelfed/Dockerfile

27 lines
1.4 KiB
Docker
Raw Normal View History

2020-05-28 16:18:10 +00:00
FROM reg.zknt.org/zknt/debian-php as builder
RUN set -xe;\
2020-06-08 18:50:42 +00:00
apt-install git php-curl php-zip php-bcmath php-intl php-mbstring php-xml composer &&\
composer global require hirak/prestissimo --no-interaction --no-suggest --prefer-dist &&\
2020-05-28 16:18:10 +00:00
cd /var && rm -rf www &&\
git clone https://github.com/pixelfed/pixelfed.git www &&\
cd www &&\
2020-05-28 16:22:58 +00:00
curl -L https://github.com/hnrd/pixelfed/commit/6e822b67c50dfb6cc6dc352ce80bf3326b06cca9.patch | git apply &&\
2020-06-18 13:41:38 +00:00
composer install --prefer-dist --no-interaction --no-ansi --no-dev --optimize-autoloader &&\
2020-05-28 16:18:10 +00: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
FROM reg.zknt.org/zknt/debian-php
COPY --from=builder /var/www /var/www
COPY entrypoint.sh /entrypoint.sh
2020-05-30 10:52:02 +00:00
COPY worker-entrypoint.sh /worker-entrypoint.sh
2020-05-30 10:46:57 +00:00
COPY wait-for-db.php /wait-for-db.php
2020-05-29 11:12:26 +00: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 &&\
sed -i 's/AllowOverride None/AllowOverride All/g' /etc/apache2/apache2.conf
WORKDIR /var/www
2020-05-28 16:18:10 +00:00
VOLUME /var/www/storage /var/www/bootstrap
ENTRYPOINT /entrypoint.sh