-
-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
full build test for branched version of mod
- Loading branch information
Showing
13 changed files
with
104 additions
and
843 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,37 @@ | ||
FROM lsiobase/ubuntu:bionic | ||
## Buildstage ## | ||
FROM lsiobase/ubuntu:bionic as buildstage | ||
|
||
# set version label | ||
ARG BUILD_DATE | ||
ARG VERSION | ||
ARG CALIBREWEB_RELEASE | ||
ARG CALIBRE_RELEASE | ||
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" | ||
LABEL maintainer="chbmb" | ||
|
||
RUN \ | ||
echo "**** install build packages ****" && \ | ||
echo "**** Install packages ****" && \ | ||
apt-get update && \ | ||
apt-get install -y \ | ||
git \ | ||
python-pip && \ | ||
echo "**** install runtime packages ****" && \ | ||
apt-get install -y \ | ||
imagemagick \ | ||
python-minimal && \ | ||
echo "**** install calibre-web ****" && \ | ||
if [ -z ${CALIBREWEB_RELEASE+x} ]; then \ | ||
CALIBREWEB_RELEASE=$(curl -sX GET "https://api.github.com/repos/janeczku/calibre-web/releases/latest" \ | ||
xz-utils && \ | ||
echo "**** Fetch calibre bin ****" && \ | ||
if [ -z ${CALIBRE_RELEASE+x} ]; then \ | ||
CALIBRE_RELEASE=$(curl -sX GET "https://api.github.com/repos/kovidgoyal/calibre/releases/latest" \ | ||
| awk '/tag_name/{print $4;exit}' FS='[""]'); \ | ||
fi && \ | ||
curl -o \ | ||
/tmp/calibre-web.tar.gz -L \ | ||
https://github.com/janeczku/calibre-web/archive/${CALIBREWEB_RELEASE}.tar.gz && \ | ||
CALIBRE_RELEASE=$(echo "${CALIBRE_RELEASE}" | sed 's/^v//g' ) && \ | ||
mkdir -p \ | ||
/app/calibre-web && \ | ||
/root-layer/app/calibre && \ | ||
curl -o \ | ||
/tmp/calibre.txz -L \ | ||
"https://github.com/kovidgoyal/calibre/releases/download/v${CALIBRE_RELEASE}/calibre-${CALIBRE_RELEASE}-x86_64.txz" && \ | ||
tar xf \ | ||
/tmp/calibre-web.tar.gz -C \ | ||
/app/calibre-web --strip-components=1 && \ | ||
cd /app/calibre-web && \ | ||
pip install --no-cache-dir -U -r \ | ||
requirements.txt && \ | ||
pip install --no-cache-dir -U -r \ | ||
optional-requirements.txt && \ | ||
echo "**** cleanup ****" && \ | ||
apt-get -y purge \ | ||
git \ | ||
python-pip && \ | ||
apt-get -y autoremove && \ | ||
rm -rf \ | ||
/tmp/* \ | ||
/var/lib/apt/lists/* \ | ||
/var/tmp/* | ||
|
||
# add local files | ||
COPY root/ / | ||
/tmp/calibre.txz \ | ||
-C /root-layer/app/calibre | ||
|
||
# copy local files | ||
COPY root/ /root-layer/ | ||
|
||
## Single layer deployed image ## | ||
FROM scratch | ||
|
||
# ports and volumes | ||
EXPOSE 8083 | ||
VOLUME /books /config | ||
# Add files from buildstage | ||
COPY --from=buildstage /root-layer/ / |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.