forked from solidnerd/docker-bookstack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
47 lines (38 loc) · 1.93 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
45
46
47
FROM php:7.1-apache-stretch
ENV BOOKSTACK=BookStack \
BOOKSTACK_VERSION=0.24.1 \
BOOKSTACK_HOME="/var/www/bookstack"
RUN apt-get update && apt-get install -y git zlib1g-dev libfreetype6-dev libjpeg62-turbo-dev libmcrypt-dev libpng-dev wget libldap2-dev libtidy-dev \
&& docker-php-ext-install pdo pdo_mysql mbstring zip tidy \
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
&& docker-php-ext-install ldap \
&& docker-php-ext-configure gd --with-freetype-dir=usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install gd \
&& cd /var/www && curl -sS https://getcomposer.org/installer | php \
&& mv /var/www/composer.phar /usr/local/bin/composer \
&& wget https://github.com/ssddanbrown/BookStack/archive/v${BOOKSTACK_VERSION}.tar.gz -O ${BOOKSTACK}.tar.gz \
&& tar -xf ${BOOKSTACK}.tar.gz && mv BookStack-${BOOKSTACK_VERSION} ${BOOKSTACK_HOME} && rm ${BOOKSTACK}.tar.gz \
&& cd $BOOKSTACK_HOME && composer install \
&& chown -R www-data:www-data $BOOKSTACK_HOME \
&& apt-get -y autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /var/tmp/* /etc/apache2/sites-enabled/000-*.conf
COPY php.ini /usr/local/etc/php/php.ini
COPY bookstack.conf /etc/apache2/sites-enabled/bookstack.conf
RUN a2enmod rewrite
COPY docker-entrypoint.sh /
WORKDIR $BOOKSTACK_HOME
EXPOSE 80
VOLUME ["$BOOKSTACK_HOME/public/uploads","$BOOKSTACK_HOME/public/storage"]
ENTRYPOINT ["/docker-entrypoint.sh"]
ARG BUILD_DATE
ARG VCS_REF
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.docker.dockerfile="/Dockerfile" \
org.label-schema.license="MIT" \
org.label-schema.name="bookstack" \
org.label-schema.vendor="solidnerd" \
org.label-schema.url="https://github.com/solidnerd/docker-bookstack/" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url="https://github.com/solidnerd/docker-bookstack.git" \
org.label-schema.vcs-type="Git"