dockerfiles/privatebin/Dockerfile

46 lines
1.6 KiB
Docker
Raw Normal View History

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
ENV GID=991 UID=991 \
UPLOAD_MAX_SIZE=10M \
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
RUN BUILD_DEPS="tar gnupg" \
&& apk -U upgrade && apk add $BUILD_DEPS \
&& mkdir -p privatebin/data privatebin/cfg \
&& 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 - \
&& 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 \
&& cd srv \
&& tar -xzf /privatebin.tar.gz --strip 1 \
&& mv cfg /privatebin \
&& mv lib /privatebin \
&& mv tpl /privatebin \
&& mv vendor /privatebin \
&& sed -i "s#define('PATH', '');#define('PATH', '/privatebin/');#" index.php \
&& apk del $BUILD_DEPS \
&& rm -rf /var/cache/apk/* *.md /privatebin.tar.gz* "${GNUPGHOME}"
2016-04-11 15:59:32 +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
# 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-09-16 17:08:06 +02:00
EXPOSE 8888
2016-04-11 15:59:32 +02:00
LABEL maintainer="hoellen <info@hoellen.eu>" \
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"]