docker-flarum/Dockerfile

54 lines
1.7 KiB
Docker
Raw Normal View History

2016-07-14 04:12:58 -04:00
FROM xataz/alpine:3.4
MAINTAINER xataz <https://github.com/xataz>
MAINTAINER hardware <https://github.com/hardware>
2016-07-17 05:35:13 -04:00
ARG VERSION=v0.1.0-beta.5
ENV GID=991 \
UID=991 \
DB_HOST=mariadb \
DB_USER=flarum \
DB_NAME=flarum
2016-07-14 04:12:58 -04:00
RUN echo "@testing https://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
&& export BUILD_DEPS="git" \
2016-07-16 06:07:10 -04:00
&& apk --no-cache add ${BUILD_DEPS} \
nginx \
curl \
supervisor \
2016-07-17 05:35:13 -04:00
mariadb-client \
2016-07-16 06:07:10 -04:00
php7-phar@testing \
php7-fpm@testing \
php7-curl@testing \
php7-mbstring@testing \
php7-openssl@testing \
php7-json@testing \
php7-pdo_mysql@testing \
php7-gd@testing \
php7-dom@testing \
php7-ctype@testing \
php7-session@testing \
2016-07-14 04:12:58 -04:00
&& cd /tmp \
&& ln -s /usr/bin/php7 /usr/bin/php \
# && curl -s http://getcomposer.org/installer | php \
# && mv /tmp/composer.phar /usr/bin/composer \
# && chmod +x /usr/bin/composer \
2016-07-17 09:55:22 -04:00
&& mkdir -p /flarum/app \
2016-07-14 04:12:58 -04:00
&& addgroup -g ${GID} flarum && adduser -h /flarum -s /bin/sh -D -G flarum -u ${UID} flarum \
2016-07-17 09:55:22 -04:00
&& chown -R flarum:flarum /flarum \
&& su-exec flarum:flarum git clone https://github.com/hardware/flarum-src.git /flarum/app
# && su-exec flarum:flarum composer create-project flarum/flarum /flarum/app $VERSION --stability=beta \
# && composer clear-cache \
# && rm -rf /flarum/.composer
2016-07-14 04:12:58 -04:00
2016-07-17 09:55:22 -04:00
COPY config.sql /flarum/app/config.sql
2016-07-14 04:12:58 -04:00
COPY nginx.conf /etc/nginx/nginx.conf
COPY php-fpm.conf /etc/php7/php-fpm.conf
COPY supervisord.conf /etc/supervisor/supervisord.conf
2016-07-17 05:35:13 -04:00
COPY startup /usr/local/bin/startup
RUN chmod +x /usr/local/bin/startup
2016-07-14 04:12:58 -04:00
2016-07-17 10:57:27 -04:00
VOLUME /flarum/www
2016-07-14 04:12:58 -04:00
EXPOSE 8080
2016-07-17 05:35:13 -04:00
CMD ["/usr/bin/tini","--","startup"]