added GPG based verification of PrivateBin release
This commit is contained in:
parent
f03a438ee5
commit
3236992f33
17
Dockerfile
17
Dockerfile
@ -2,6 +2,8 @@ FROM php:fpm-alpine
|
|||||||
|
|
||||||
MAINTAINER PrivateBin <support@privatebin.org>
|
MAINTAINER PrivateBin <support@privatebin.org>
|
||||||
|
|
||||||
|
ENV RELEASE 1.1.1
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
apk add --no-cache nginx supervisor \
|
apk add --no-cache nginx supervisor \
|
||||||
@ -35,12 +37,18 @@ RUN \
|
|||||||
&& mv /usr/local/etc/php-fpm.d/zz-docker.conf /usr/local/etc/php-fpm.d/20-docker.conf \
|
&& mv /usr/local/etc/php-fpm.d/zz-docker.conf /usr/local/etc/php-fpm.d/20-docker.conf \
|
||||||
# Install PrivateBin
|
# Install PrivateBin
|
||||||
&& apk add --no-cache gnupg \
|
&& apk add --no-cache gnupg \
|
||||||
|
&& export GNUPGHOME="$(mktemp -d)" \
|
||||||
|
&& gpg2 --list-public-keys || /bin/true \
|
||||||
|
&& curl -s https://privatebin.info/key/rugk.asc | gpg2 --import - \
|
||||||
&& cd /tmp \
|
&& cd /tmp \
|
||||||
&& curl -s https://codeload.github.com/PrivateBin/PrivateBin/tar.gz/1.1.1 | tar -xzf - \
|
&& curl -Ls https://github.com/PrivateBin/PrivateBin/releases/download/${RELEASE}/PrivateBin-${RELEASE}.tar.gz.asc > PrivateBin-${RELEASE}.tar.gz.asc \
|
||||||
|
&& curl -Ls https://github.com/PrivateBin/PrivateBin/archive/${RELEASE}.tar.gz > PrivateBin-${RELEASE}.tar.gz \
|
||||||
|
&& gpg2 --verify PrivateBin-${RELEASE}.tar.gz.asc \
|
||||||
|
&& tar -xzf PrivateBin-${RELEASE}.tar.gz \
|
||||||
&& rm -rf /var/www \
|
&& rm -rf /var/www \
|
||||||
&& mv /tmp/PrivateBin-1.1.1 /var/www \
|
&& mv /tmp/PrivateBin-${RELEASE} /var/www \
|
||||||
&& cd /var/www \
|
&& cd /var/www \
|
||||||
&& rm *.md \
|
&& rm *.md cfg/conf.sample.php \
|
||||||
&& mv cfg /srv \
|
&& mv cfg /srv \
|
||||||
&& mv lib /srv \
|
&& mv lib /srv \
|
||||||
&& mv tpl /srv \
|
&& mv tpl /srv \
|
||||||
@ -48,6 +56,7 @@ RUN \
|
|||||||
&& mkdir -p /srv/data \
|
&& mkdir -p /srv/data \
|
||||||
&& sed -i "s#define('PATH', '');#define('PATH', '/srv/');#" index.php \
|
&& sed -i "s#define('PATH', '');#define('PATH', '/srv/');#" index.php \
|
||||||
&& chown -R www-data.www-data /var/www /srv/* \
|
&& chown -R www-data.www-data /var/www /srv/* \
|
||||||
|
&& rm -rf "${GNUPGHOME}" /tmp/* \
|
||||||
&& apk del --no-cache gnupg
|
&& apk del --no-cache gnupg
|
||||||
|
|
||||||
WORKDIR /var/www
|
WORKDIR /var/www
|
||||||
@ -56,7 +65,7 @@ ADD etc/ /etc/
|
|||||||
ADD usr/ /usr/
|
ADD usr/ /usr/
|
||||||
|
|
||||||
# mark dirs as volumes that need to be writable, allows running the container --read-only
|
# mark dirs as volumes that need to be writable, allows running the container --read-only
|
||||||
VOLUME /srv/data /srv/cfg/conf.php /tmp /var/tmp /var/run /var/log
|
VOLUME /srv/data /tmp /var/tmp /var/run /var/log
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user