Files
docker-privatebin/Dockerfile

51 lines
1.7 KiB
Docker
Raw Normal View History

2017-01-03 22:27:16 +01:00
FROM alpine:latest
MAINTAINER Jeroen Geusebroek <me@jeroengeusebroek.nl>
ARG VERSION=1.3.3
2017-01-03 22:27:16 +01:00
ENV GID=991 UID=991
RUN apk -U add \
curl \
nginx \
php7-fpm \
php7-gd \
php7-json \
2018-03-19 09:43:07 +01:00
php7-pdo \
php7-pdo_mysql \
2020-08-06 12:14:54 +02:00
php7-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 \
&& 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
COPY files/php-fpm.conf /etc/php7/php-fpm.conf
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"]