2022-03-26 12:33:00 +00:00
|
|
|
FROM python:3.9-slim
|
2022-03-25 21:21:17 +00:00
|
|
|
|
|
|
|
# set version label
|
|
|
|
ARG VERSION
|
|
|
|
ARG CALIBRE_RELEASE
|
|
|
|
ARG FFF_RELEASE
|
2022-03-25 21:57:33 +00:00
|
|
|
LABEL build_version="FFDL-Auto version:- ${VERSION} Calibre: ${CALIBRE_RELEASE} FFF: ${FFF_RELEASE}"
|
|
|
|
|
2022-03-25 22:28:37 +00:00
|
|
|
ENV PUID="911" \
|
2022-03-26 03:41:37 +00:00
|
|
|
PGID="911"
|
2022-03-26 03:41:39 +00:00
|
|
|
|
2022-03-25 22:28:37 +00:00
|
|
|
RUN set -x && \
|
2022-03-26 12:33:00 +00:00
|
|
|
apt-get update && \
|
2022-03-26 12:38:09 +00:00
|
|
|
apt-get install -y --upgrade \
|
2022-03-25 21:21:17 +00:00
|
|
|
bash \
|
|
|
|
ca-certificates \
|
|
|
|
gcc \
|
|
|
|
wget \
|
|
|
|
xdg-utils \
|
|
|
|
curl \
|
|
|
|
dbus \
|
|
|
|
jq \
|
2022-03-26 12:33:00 +00:00
|
|
|
python3
|
2022-03-25 22:18:04 +00:00
|
|
|
|
2022-03-26 03:31:06 +00:00
|
|
|
RUN set -x && \
|
|
|
|
addgroup --gid "$PGID" abc && \
|
|
|
|
adduser \
|
|
|
|
--gecos "" \
|
|
|
|
--disabled-password \
|
|
|
|
--no-create-home \
|
|
|
|
--uid "$PUID" \
|
|
|
|
--ingroup abc \
|
|
|
|
--shell /bin/bash \
|
|
|
|
abc
|
|
|
|
|
|
|
|
RUN echo "**** install calibre ****" && \
|
2022-03-26 03:41:39 +00:00
|
|
|
set -x && \
|
2022-03-26 12:38:09 +00:00
|
|
|
apt-get install -y calibre && \
|
2022-03-26 03:41:39 +00:00
|
|
|
dbus-uuidgen > /etc/machine-id
|
2022-03-26 03:31:06 +00:00
|
|
|
|
2022-03-26 14:19:32 +00:00
|
|
|
|
2022-03-26 03:31:06 +00:00
|
|
|
RUN echo "**** s6 omsta;; ****" && \
|
|
|
|
set -ex && \
|
|
|
|
ARCH=`uname -m` && \
|
|
|
|
if [ "$ARCH" = "x86_64" ]; then \
|
|
|
|
s6_package="s6-overlay-amd64.tar.gz" ; \
|
|
|
|
elif [ "$ARCH" = "aarch64" ]; then \
|
|
|
|
s6_package="s6-overlay-aarch64.tar.gz" ; \
|
|
|
|
else \
|
|
|
|
echo "unknown arch: ${ARCH}" && \
|
|
|
|
exit 1 ; \
|
|
|
|
fi && \
|
|
|
|
wget -P /tmp/ https://github.com/just-containers/s6-overlay/releases/download/v2.2.0.3/${s6_package} && \
|
2022-03-26 03:59:00 +00:00
|
|
|
tar -xzf /tmp/${s6_package} -C /
|
2022-03-25 21:21:17 +00:00
|
|
|
|
|
|
|
RUN echo *** Install Packages *** && \
|
2022-03-25 22:28:37 +00:00
|
|
|
set -x && \
|
2022-09-12 10:26:29 +00:00
|
|
|
if [ -z ${FFF_RELEASE} ]; then \
|
|
|
|
echo "FFF Using Default Release"; \
|
2022-03-26 03:31:06 +00:00
|
|
|
python3 -m pip --no-cache-dir install FanFicFare; \
|
2022-03-25 21:21:17 +00:00
|
|
|
else \
|
2022-09-12 10:26:29 +00:00
|
|
|
echo "FF Using ${FFF_RELEASE} Release"; \
|
2022-03-26 03:31:06 +00:00
|
|
|
python3 -m pip --no-cache-dir install --extra-index-url https://testpypi.python.org/pypi FanFicFare==${FFF_RELEASE}; \
|
2022-03-25 21:21:17 +00:00
|
|
|
fi && \
|
2022-03-26 12:44:41 +00:00
|
|
|
python3 -m pip --no-cache-dir install pushbullet.py pillow && \
|
2022-03-25 21:21:17 +00:00
|
|
|
ln -s /opt/calibre/calibredb /bin/calibredb
|
2022-03-26 14:19:32 +00:00
|
|
|
|
|
|
|
RUN echo "**** cleanup ****" && \
|
|
|
|
rm -rf \
|
|
|
|
/tmp/* \
|
|
|
|
/var/lib/apt/lists/* \
|
|
|
|
/var/tmp/*
|
2022-03-25 21:21:17 +00:00
|
|
|
|
2022-03-26 01:42:49 +00:00
|
|
|
COPY root/ /
|
|
|
|
|
2022-03-25 21:21:17 +00:00
|
|
|
VOLUME /config
|
|
|
|
|
|
|
|
WORKDIR /config
|
|
|
|
|
2022-03-26 01:31:03 +00:00
|
|
|
ENTRYPOINT ["/init"]
|