docker-dokuwiki/Dockerfile
2020-11-02 07:16:26 -08:00

59 lines
1.3 KiB
Docker
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.12
# set version label
ARG BUILD_DATE
ARG VERSION
ARG DOKUWIKI_RELEASE
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="chbmb"
RUN \
echo "**** install build packages ****" && \
apk add --no-cache --virtual=build-dependencies \
tar \
xmlstarlet && \
echo "**** install runtime packages ****" && \
apk add --no-cache \
curl \
imagemagick \
php7-bz2 \
php7-ctype \
php7-curl \
php7-gd \
php7-iconv \
php7-ldap \
php7-pecl-imagick \
php7-pdo_mysql \
php7-pdo_pgsql \
php7-pdo_sqlite \
php7-sqlite3 \
php7-xml \
php7-zip && \
echo "**** install dokuwiki ****" && \
if [ -z ${DOKUWIKI_RELEASE+x} ]; then \
DOKUWIKI_RELEASE=$(wget https://download.dokuwiki.org/rss -O - 2>/dev/null | \
xmlstarlet sel -T -t -v '/rss/channel/item[1]/link' | \
cut -d'-' -f2-4 | cut -d'.' -f1 ); \
fi && \
curl -o \
/tmp/dokuwiki.tar.gz -L \
"https://github.com/splitbrain/dokuwiki/archive/release_stable_${DOKUWIKI_RELEASE}.tar.gz" && \
mkdir -p \
/app/dokuwiki && \
tar xf \
/tmp/dokuwiki.tar.gz -C \
/app/dokuwiki --strip-components=1 && \
echo "**** cleanup ****" && \
apk del --purge \
build-dependencies && \
rm -rf \
/root/.cache \
/tmp/*
# copy local files
COPY root/ /
# ports and volumes
EXPOSE 80 443
VOLUME /config