-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
44 lines (34 loc) · 1.12 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM php:7.0-apache
EXPOSE 80
EXPOSE 443
ENV PRIVATEBIN_URL https://github.com/PrivateBin/PrivateBin/archive/master.zip
ENV DOMAIN example.com
ADD cert.sh /cert.sh
RUN chmod a+x /cert.sh
RUN sed -i "/#ServerName www.example.com/c\ServerName $DOMAIN" /etc/apache2/sites-available/000-default.conf
RUN apt-get update
RUN apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng12-dev \
wget \
unzip
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
RUN docker-php-ext-install -j$(nproc) gd
RUN set -x \
&& cd /var/www/html \
&& rm -rf *
RUN cd /tmp \
&& wget $PRIVATEBIN_URL \
&& unzip master.zip \
&& cd PrivateBin-master \
&& mv * /var/www/html \
&& cd /var/www/html \
&& rm *.md
RUN echo 'deb http://ftp.debian.org/debian jessie-backports main' >> /etc/apt/sources.list
RUN apt-get update
RUN apt-get install -y python-certbot-apache -t jessie-backports
RUN rm -rf /var/lib/apt/lists/*
RUN apt-get --purge autoremove -y unzip
RUN apt-get --purge autoremove -y wget
RUN echo "Don't forget to edit & run /cert.sh"