ulogger-server/Dockerfile

48 lines
1.3 KiB
Docker
Raw Normal View History

2022-03-20 18:28:16 +01:00
FROM alpine:3.15
2017-08-08 15:55:43 +02:00
2017-08-15 14:33:00 +02:00
LABEL maintainer="Bartek Fabiszewski (https://github.com/bfabiszewski)"
2017-08-08 15:55:43 +02:00
ARG DB_ROOT_PASS=secret1
ARG DB_USER_PASS=secret2
2019-02-22 20:22:27 +01:00
# supported drivers: mysql, pgsql, sqlite
2019-01-24 19:07:41 +01:00
ARG DB_DRIVER=mysql
2017-08-08 15:55:43 +02:00
ENV ULOGGER_ADMIN_USER admin
2019-01-24 19:07:41 +01:00
ENV ULOGGER_DB_DRIVER ${DB_DRIVER}
2019-05-15 12:03:55 +02:00
ENV ULOGGER_ENABLE_SETUP 0
2017-08-08 15:55:43 +02:00
2019-01-24 19:07:41 +01:00
ENV LANG=en_US.utf-8
RUN apk add --no-cache \
nginx \
php7-ctype php7-fpm php7-json php7-pdo php7-session php7-simplexml php7-xmlwriter
RUN if [ "${DB_DRIVER}" = "mysql" ]; then apk add --no-cache mariadb mariadb-client php7-pdo_mysql; fi
RUN if [ "${DB_DRIVER}" = "pgsql" ]; then apk add --no-cache postgresql postgresql-client php7-pdo_pgsql; fi
RUN if [ "${DB_DRIVER}" = "sqlite" ]; then apk add --no-cache sqlite php7-pdo_sqlite; fi
2017-08-08 15:55:43 +02:00
RUN ln -sf /dev/stdout /var/log/nginx/access.log && \
ln -sf /dev/stderr /var/log/nginx/error.log && \
ln -sf /dev/stdout /var/log/php7/error.log && \
ln -sf /dev/stderr /var/log/php7/error.log
RUN rm -rf /var/www/html
RUN mkdir -p /var/www/html
2017-08-08 15:55:43 +02:00
COPY .docker/run.sh /run.sh
RUN chmod +x /run.sh
COPY .docker/init.sh /init.sh
RUN chmod +x /init.sh
2022-03-20 18:28:16 +01:00
COPY .docker/nginx.conf /etc/nginx/http.d/default.conf
RUN chown nginx.nginx /etc/nginx/http.d/default.conf
2017-08-08 15:55:43 +02:00
COPY . /var/www/html
RUN /init.sh "${DB_ROOT_PASS}" "${DB_USER_PASS}"
EXPOSE 80
2019-01-24 19:07:41 +01:00
VOLUME ["/data"]
2017-08-08 15:55:43 +02:00
CMD ["/run.sh"]