-
Notifications
You must be signed in to change notification settings - Fork 16
/
Dockerfile
31 lines (23 loc) · 1022 Bytes
/
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
FROM php:7.3-alpine
LABEL maintainer="xaljer@outlook.com"
ARG KODEXPLORER_VERSION=4.39
ARG KODEXPLORER_URL="https://github.com/kalcaddle/KodExplorer/archive/${KODEXPLORER_VERSION}.tar.gz"
RUN set -x \
&& mkdir -p /usr/src/kodexplorer \
&& apk --update --no-cache add wget bash \
&& wget -q -O /tmp/kodexplorer.tar.gz "$KODEXPLORER_URL" \
&& tar -xzf /tmp/kodexplorer.tar.gz -C /usr/src/kodexplorer/ --strip-components=1 \
&& rm -rf /tmp/*
RUN set -x \
&& apk add --no-cache --update \
freetype libpng libjpeg-turbo \
freetype-dev libpng-dev libjpeg-turbo-dev \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install -j "$(getconf _NPROCESSORS_ONLN)" gd \
&& apk del --no-cache freetype-dev libpng-dev libjpeg-turbo-dev
WORKDIR /var/www/html
COPY entrypoint.sh /usr/local/bin/
RUN chmod a+x /usr/local/bin/entrypoint.sh
EXPOSE 80
ENTRYPOINT ["entrypoint.sh"]
CMD [ "php", "-S", "0000:80", "-t", "/var/www/html" ]