Files
docker-privatebin/Dockerfile

51 lines
1.7 KiB
Docker
Raw Normal View History

2022-10-09 11:28:21 +02:00
FROM alpine:latest
2017-01-03 22:27:16 +01:00
MAINTAINER Jeroen Geusebroek <me@jeroengeusebroek.nl>
2022-04-19 14:26:08 +02:00
ARG VERSION=1.4.0
2017-01-03 22:27:16 +01:00
ENV GID=991 UID=991
RUN apk -U add \
curl \
nginx \
2022-10-09 11:28:21 +02:00
php8-fpm \
php8-gd \
php8-json \
php8-pdo \
php8-pdo_mysql \
php8-pdo_pgsql \
2017-01-03 22:27:16 +01:00
supervisor \
ca-certificates \
tar \
gnupg \
&& mkdir -p privatebin/data \
&& export GNUPGHOME="$(mktemp -d)" \
&& gpg2 --list-public-keys || /bin/true \
2018-08-11 23:37:03 +02:00
&& curl -s https://privatebin.info/key/release.asc | gpg2 --import - \
&& curl -Lso privatebin.tar.gz.asc https://github.com/PrivateBin/PrivateBin/releases/download/$VERSION/PrivateBin-$VERSION.tar.gz.asc \
&& curl -Lso privatebin.tar.gz https://github.com/PrivateBin/PrivateBin/archive/$VERSION.tar.gz \
&& gpg2 --verify privatebin.tar.gz.asc \
&& rm -rf "$GNUPGHOME" /var/www/* \
&& cd /var/www \
&& tar -xzf /privatebin.tar.gz --strip 1 \
&& mv cfg/conf.sample.php /privatebin/ \
&& mv cfg /privatebin/ \
&& mv lib /privatebin \
&& mv tpl /privatebin \
&& mv vendor /privatebin \
&& sed -i "s#define('PATH', '');#define('PATH', '/privatebin/');#" index.php \
&& apk del tar ca-certificates curl gnupg \
2021-07-31 16:50:58 +02:00
&& rm -f /privatebin.tar.gz* *.md /var/cache/apk/*
2017-01-03 22:27:16 +01:00
COPY files/nginx.conf /etc/nginx/nginx.conf
2022-10-09 11:28:21 +02:00
COPY files/php-fpm.conf /etc/php8/php-fpm.conf
2017-01-03 22:27:16 +01:00
COPY files/supervisord.conf /usr/local/etc/supervisord.conf
COPY entrypoint.sh /
2020-01-17 11:36:26 +01:00
# Mark dirs as volumes that need to be writable, allows running the container --read-only
VOLUME [ "/privatebin/data", "/privatebin/cfg", "/etc", "/tmp", "/var/lib/nginx/tmp", "/run", "/var/log" ]
2017-01-03 22:27:16 +01:00
EXPOSE 80
LABEL description "PrivateBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data."
CMD ["/entrypoint.sh"]