<gh_stars>0
FROM alpine:3.14.0

VOLUME /var/www/app/data
VOLUME /var/www/app/plugins
#VOLUME /etc/nginx/ssl

EXPOSE 80 22

ARG VERSION
ARG PASSWD

RUN apk --no-cache --update add \
    tzdata openssl unzip nginx bash ca-certificates s6 curl ssmtp mailx php7 php7-phar php7-curl \
    php7-fpm php7-json php7-zlib php7-xml php7-dom php7-ctype php7-opcache php7-zip php7-iconv \
    php7-pdo php7-pdo_mysql php7-pdo_sqlite php7-pdo_pgsql php7-mbstring php7-session php7-bcmath \
    php7-gd php7-mcrypt php7-openssl php7-sockets php7-posix php7-ldap php7-simplexml \
    openssh && \
    rm -rf /var/www/localhost && \
    rm -f /etc/php7/php-fpm.d/www.conf && \
    rm -f /etc/ssh/sshd_config

ADD . /var/www/app
ADD docker/ /

RUN rm -rf /var/www/app/docker && echo $VERSION > /version.txt
RUN echo -e "$PASSWD\n$PASSWD" | passwd root
RUN rm -rf /etc/ssh/ssh_host_rsa_key /etc/ssh/ssh_host_dsa_key

ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

CMD []
