2022-10-10 02:05:02 -04:00
|
|
|
FROM casjaysdevdocker/python2:latest AS build
|
2022-02-14 16:44:08 -05:00
|
|
|
|
2022-10-10 22:32:35 -04:00
|
|
|
ARG PORTS="80 443"
|
|
|
|
|
2022-02-14 16:44:08 -05:00
|
|
|
WORKDIR /tmp/build
|
|
|
|
|
|
|
|
RUN apk -U upgrade && \
|
|
|
|
apk add --no-cache \
|
|
|
|
alpine-sdk \
|
|
|
|
autoconf \
|
|
|
|
automake \
|
|
|
|
gettext \
|
|
|
|
git \
|
|
|
|
libtool \
|
|
|
|
openssl \
|
|
|
|
openssl-dev \
|
|
|
|
linux-headers \
|
2022-09-07 09:58:10 -04:00
|
|
|
rrdtool \
|
2022-10-11 09:57:13 -04:00
|
|
|
ffmpeg-dev \
|
|
|
|
geoip-dev \
|
2022-09-07 09:58:10 -04:00
|
|
|
php8-cgi
|
2022-02-14 16:44:08 -05:00
|
|
|
|
|
|
|
RUN git clone https://github.com/cherokee/webserver.git . && \
|
|
|
|
libtoolize --force && \
|
|
|
|
./autogen.sh --prefix=/usr/local/share/cherokee && \
|
2022-07-06 23:23:31 -04:00
|
|
|
./configure CFLAGS="-static" --prefix=/usr/local/share/cherokee && \
|
|
|
|
make LDFLAGS="-all-static" && make install && \
|
2022-02-14 16:44:08 -05:00
|
|
|
echo "<p style='text-align:center'>Built from $(git rev-parse --short HEAD) on $(date)</p>" > ./version.txt && \
|
2022-10-10 10:50:46 -04:00
|
|
|
apk del --no-cache \
|
2022-02-14 16:44:08 -05:00
|
|
|
alpine-sdk \
|
|
|
|
autoconf \
|
|
|
|
automake \
|
|
|
|
gettext \
|
2022-10-11 09:57:13 -04:00
|
|
|
openssl-dev \
|
|
|
|
linux-headers \
|
|
|
|
ffmpeg-dev \
|
|
|
|
geoip-dev \
|
2022-10-10 10:50:46 -04:00
|
|
|
libtool && \
|
|
|
|
rm -Rf /var/cache/apk/* /tmp/* /var/tmp/* /usr/src/*
|
2022-02-14 16:44:08 -05:00
|
|
|
|
2022-07-09 13:21:25 -04:00
|
|
|
FROM casjaysdevdocker/php:latest
|
2022-07-06 23:15:47 -04:00
|
|
|
ARG BUILD_DATE="$(date +'%Y-%m-%d %H:%M')"
|
2022-02-14 16:44:08 -05:00
|
|
|
|
|
|
|
LABEL \
|
|
|
|
org.label-schema.name="cherokee" \
|
|
|
|
description="Alpine based image with cherokee and php8." \
|
2022-07-09 13:21:25 -04:00
|
|
|
org.label-schema.url="https://hub.docker.com/r/casjaysdevdocker/cherokee" \
|
|
|
|
org.label-schema.vcs-url="https://github.com/casjaysdevdocker/cherokee" \
|
2022-02-14 16:44:08 -05:00
|
|
|
org.label-schema.build-date=$BUILD_DATE \
|
|
|
|
org.label-schema.version=$BUILD_DATE \
|
|
|
|
org.label-schema.vcs-ref=$BUILD_DATE \
|
2022-07-09 13:21:25 -04:00
|
|
|
org.label-schema.license="WTFPL" \
|
2022-02-14 16:44:08 -05:00
|
|
|
org.label-schema.vcs-type="Git" \
|
|
|
|
org.label-schema.schema-version="1.0" \
|
|
|
|
org.label-schema.vendor="CasjaysDev" \
|
2022-07-06 23:15:47 -04:00
|
|
|
maintainer="CasjaysDev <docker-admin@casjaysdev.com>"
|
2022-02-14 16:44:08 -05:00
|
|
|
|
|
|
|
COPY --from=build /usr/local/share/cherokee/. /usr/local/share/cherokee/
|
|
|
|
COPY ./bin/. /usr/local/bin/
|
2022-10-10 02:05:02 -04:00
|
|
|
COPY ./data/. /usr/local/share/template-files/data/
|
|
|
|
COPY ./config/. /usr/local/share/template-files/config/
|
2022-02-14 16:44:08 -05:00
|
|
|
|
|
|
|
ENV PHP_SERVER=cherokee
|
|
|
|
|
2022-10-10 22:32:35 -04:00
|
|
|
WORKDIR /data/htdocs/www
|
2022-02-14 16:44:08 -05:00
|
|
|
|
2022-10-10 22:32:35 -04:00
|
|
|
EXPOSE $PORTS
|
2022-02-14 16:44:08 -05:00
|
|
|
|
2022-10-10 02:05:02 -04:00
|
|
|
VOLUME [ "/data", "/config" ]
|
2022-02-14 16:44:08 -05:00
|
|
|
|
2022-09-07 09:58:10 -04:00
|
|
|
ENTRYPOINT [ "tini", "--" ]
|
2022-10-07 18:47:10 -04:00
|
|
|
HEALTHCHECK --interval=15s --timeout=3s CMD [ "/usr/local/bin/entrypoint-cherokee.sh" "healthcheck" ]
|
2022-02-14 16:44:08 -05:00
|
|
|
CMD ["/usr/local/bin/entrypoint-cherokee.sh"]
|
2022-09-07 09:58:10 -04:00
|
|
|
|