-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Dockerfile.aarch64
61 lines (56 loc) · 2.08 KB
/
Dockerfile.aarch64
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm64v8-3.21
# set version label
ARG BUILD_DATE
ARG VERSION
ARG COPS_RELEASE
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="chbmb"
RUN \
echo "**** install runtime packages ****" && \
apk add --no-cache --upgrade \
# libxml2 \
php83-dom \
php83-gd \
php83-intl \
php83-pdo_sqlite \
php83-sqlite3 && \
echo "**** configure php-fpm to pass env vars ****" && \
sed -E -i 's/^;?clear_env ?=.*$/clear_env = no/g' /etc/php83/php-fpm.d/www.conf && \
grep -qxF 'clear_env = no' /etc/php83/php-fpm.d/www.conf || echo 'clear_env = no' >> /etc/php83/php-fpm.d/www.conf && \
echo "env[PATH] = /usr/local/bin:/usr/bin:/bin" >> /etc/php83/php-fpm.conf && \
echo "**** install cops ****" && \
if [ -z ${COPS_RELEASE+x} ]; then \
COPS_RELEASE=$(curl -sX GET "https://api.github.com/repos/mikespub-org/seblucas-cops/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \
curl -o \
/tmp/cops.tar.gz -L \
"https://github.com/mikespub-org/seblucas-cops/archive/${COPS_RELEASE}.tar.gz" && \
mkdir -p \
/app/www/public && \
tar xf /tmp/cops.tar.gz -C \
/app/www/public --strip-components=1 && \
cd /app/www/public && \
# use standard composer 2.x now, no need to install older 1.x version
composer \
install --no-dev --optimize-autoloader && \
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
echo "***install kepubify" && \
if [ -z ${KEPUBIFY_RELEASE+x} ]; then \
KEPUBIFY_RELEASE=$(curl -sX GET "https://api.github.com/repos/pgaskin/kepubify/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \
curl -o \
/usr/bin/kepubify -L \
"https://github.com/pgaskin/kepubify/releases/download/${KEPUBIFY_RELEASE}/kepubify-linux-arm64" && \
chmod 755 /usr/bin/kepubify && \
echo "**** cleanup ****" && \
rm -rf \
/root/.composer \
/tmp/*
# add local files
COPY root/ /
# ports and volumes
EXPOSE 80 443
VOLUME /config