2017-12-06 14:05:58 +01:00
|
|
|
|
FROM hoellen/nginx-php
|
2016-04-11 15:59:32 +02:00
|
|
|
|
|
2019-09-23 05:30:19 +02:00
|
|
|
|
ARG PRIVATEBIN_VER=1.3.1
|
2017-04-29 03:16:15 +02:00
|
|
|
|
|
|
|
|
|
ENV GID=991 UID=991 \
|
|
|
|
|
UPLOAD_MAX_SIZE=10M \
|
2018-06-07 11:46:47 +02:00
|
|
|
|
MEMORY_LIMIT=128M \
|
|
|
|
|
PHP_MAX_CHILDREN=15 \
|
|
|
|
|
PHP_START_SERVERS=2 \
|
|
|
|
|
PHP_MIN_SPARE_SERVERS=1 \
|
|
|
|
|
PHP_MAX_SPARE_SERVERS=6
|
2016-04-11 15:59:32 +02:00
|
|
|
|
|
2018-08-01 15:55:40 +02:00
|
|
|
|
RUN BUILD_DEPS="tar gnupg" \
|
2017-04-29 03:16:15 +02:00
|
|
|
|
&& apk -U upgrade && apk add $BUILD_DEPS \
|
2018-08-01 16:33:51 +02:00
|
|
|
|
&& mkdir -p privatebin/data privatebin/cfg \
|
2018-08-01 15:55:40 +02:00
|
|
|
|
&& export GNUPGHOME="$(mktemp -d)" \
|
|
|
|
|
&& gpg2 --list-public-keys || /bin/true \
|
2018-08-11 23:31:36 +02:00
|
|
|
|
&& wget -qO- https://privatebin.info/key/release.asc | gpg2 --import - \
|
2018-08-01 15:55:40 +02:00
|
|
|
|
&& wget -qO /privatebin.tar.gz.asc https://github.com/PrivateBin/PrivateBin/releases/download/${PRIVATEBIN_VER}/PrivateBin-${PRIVATEBIN_VER}.tar.gz.asc \
|
|
|
|
|
&& wget -qO /privatebin.tar.gz https://github.com/PrivateBin/PrivateBin/archive/${PRIVATEBIN_VER}.tar.gz \
|
|
|
|
|
&& gpg2 --verify /privatebin.tar.gz.asc \
|
2018-08-01 16:33:51 +02:00
|
|
|
|
&& cd srv \
|
2018-08-01 15:55:40 +02:00
|
|
|
|
&& tar -xzf /privatebin.tar.gz --strip 1 \
|
2018-08-01 16:33:51 +02:00
|
|
|
|
&& mv cfg /privatebin \
|
|
|
|
|
&& mv lib /privatebin \
|
|
|
|
|
&& mv tpl /privatebin \
|
|
|
|
|
&& mv vendor /privatebin \
|
|
|
|
|
&& sed -i "s#define('PATH', '');#define('PATH', '/privatebin/');#" index.php \
|
2016-06-30 13:15:04 +02:00
|
|
|
|
&& apk del $BUILD_DEPS \
|
2018-08-01 16:33:51 +02:00
|
|
|
|
&& rm -rf /var/cache/apk/* *.md /privatebin.tar.gz* "${GNUPGHOME}"
|
2016-04-11 15:59:32 +02:00
|
|
|
|
|
2017-04-29 03:16:15 +02:00
|
|
|
|
COPY rootfs /
|
2016-04-11 15:59:32 +02:00
|
|
|
|
|
2016-09-24 11:48:17 +02:00
|
|
|
|
RUN chmod +x /usr/local/bin/run.sh /etc/s6.d/*/* /etc/s6.d/.s6-svscan/*
|
2016-04-11 15:59:32 +02:00
|
|
|
|
|
2018-08-01 16:33:51 +02:00
|
|
|
|
# mark dirs as volumes that need to be writable, allows running the container --read-only
|
|
|
|
|
VOLUME /privatebin/data /php /nginx /tmp /etc/s6.d
|
2016-06-30 13:15:04 +02:00
|
|
|
|
|
2016-09-16 17:08:06 +02:00
|
|
|
|
EXPOSE 8888
|
2016-04-11 15:59:32 +02:00
|
|
|
|
|
2017-12-06 14:05:58 +01:00
|
|
|
|
LABEL maintainer="hoellen <info@hoellen.eu>" \
|
2017-04-29 03:16:15 +02:00
|
|
|
|
description="A minimalist, open source online pastebin where the server has zero knowledge of pasted data" \
|
2019-07-09 20:16:48 +02:00
|
|
|
|
version="PrivateBin 1.3"
|
2017-01-19 02:31:59 +01:00
|
|
|
|
|
2016-09-16 17:08:06 +02:00
|
|
|
|
CMD ["run.sh"]
|