forked from BookStackApp/BookStack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
54 lines (43 loc) · 2.19 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
48
49
50
51
52
53
54
FROM php:7.1-apache
ENV BOOKSTACK=BookStack \
BOOKSTACK_VERSION=0.20.8 \
BOOKSTACK_HOME="/var/www/bookstack"
ADD . ${BOOKSTACK_HOME}
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/ParserYa/BookStack/archive/${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
RUN wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
RUN echo 'export NVM_DIR="$HOME/.nvm"' >> ~/.profile
RUN echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"' >> ~/.profile
RUN bash -c "source ~/.profile && nvm install 8.9.4"
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="mystand" \
org.label-schema.url="https://github.com/ParserYa/BookStack" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url="https://github.com/ParserYa/BookStack.git" \
org.label-schema.vcs-type="Git"