Change to release based tagging

Rebase on Ubuntu baseimage.
This commit is contained in:
chbmb 2019-06-02 15:42:37 +01:00
parent cea504468f
commit 63a4fcaacc
4 changed files with 66 additions and 140 deletions

View File

@ -1,60 +1,32 @@
FROM lsiobase/python:3.9
FROM lsiobase/ubuntu:bionic
# set version label
ARG BUILD_DATE
ARG VERSION
ARG CALIBRE_COMMIT
ARG CALIBRE_RELEASE
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="chbmb"
RUN \
echo "**** install build packages ****" && \
apk add --no-cache --virtual=build-dependencies \
file \
fontconfig-dev \
freetype-dev \
g++ \
gcc \
ghostscript-dev \
lcms2-dev \
libjpeg-turbo-dev \
libpng-dev \
libtool \
libwebp-dev \
libxml2-dev \
libxslt-dev \
make \
perl-dev \
python2-dev \
tiff-dev \
xz \
zlib-dev && \
apt-get update && \
apt-get install -y \
git \
python-pip && \
echo "**** install runtime packages ****" && \
apk add --no-cache \
fontconfig \
freetype \
ghostscript \
imagemagick6 \
jq \
lcms2 \
libjpeg-turbo \
libltdl \
libpng \
libwebp \
libxml2 \
libxslt \
tiff \
zlib && \
apt-get install -y \
imagemagick \
python-minimal && \
echo "**** install calibre-web ****" && \
if [ -z ${CALIBRE_COMMIT+x} ]; then \
CALIBRE_COMMIT=$(curl -sX GET https://api.github.com/repos/janeczku/calibre-web/commits/master \
| jq -r '. | .sha'); \
fi && \
if [ -z ${CALIBRE_RELEASE+x} ]; then \
CALIBRE_RELEASE=$(curl -sX GET "https://api.github.com/repos/janeczku/calibre-web/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/${CALIBRE_RELEASE}.tar.gz && \
mkdir -p \
/app/calibre-web && \
curl -o \
/tmp/calibre-web.tar.gz -L \
https://github.com/janeczku/calibre-web/archive/${CALIBRE_COMMIT}.tar.gz && \
tar xf \
/tmp/calibre-web.tar.gz -C \
/app/calibre-web --strip-components=1 && \
@ -64,11 +36,9 @@ RUN \
pip install --no-cache-dir -U -r \
optional-requirements.txt && \
echo "**** cleanup ****" && \
apk del --purge \
build-dependencies && \
rm -rf \
/tmp/*
# add local files
COPY root/ /

View File

@ -1,60 +1,32 @@
FROM lsiobase/python:arm64v8-3.9
FROM lsiobase/ubuntu:arm64v8-bionic
# set version label
ARG BUILD_DATE
ARG VERSION
ARG CALIBRE_COMMIT
ARG CALIBRE_RELEASE
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="chbmb"
RUN \
echo "**** install build packages ****" && \
apk add --no-cache --virtual=build-dependencies \
file \
fontconfig-dev \
freetype-dev \
g++ \
gcc \
ghostscript-dev \
lcms2-dev \
libjpeg-turbo-dev \
libpng-dev \
libtool \
libwebp-dev \
libxml2-dev \
libxslt-dev \
make \
perl-dev \
python2-dev \
tiff-dev \
xz \
zlib-dev && \
apt-get update && \
apt-get install -y \
git \
python-pip && \
echo "**** install runtime packages ****" && \
apk add --no-cache \
fontconfig \
freetype \
ghostscript \
imagemagick6 \
jq \
lcms2 \
libjpeg-turbo \
libltdl \
libpng \
libwebp \
libxml2 \
libxslt \
tiff \
zlib && \
apt-get install -y \
imagemagick \
python-minimal && \
echo "**** install calibre-web ****" && \
if [ -z ${CALIBRE_COMMIT+x} ]; then \
CALIBRE_COMMIT=$(curl -sX GET https://api.github.com/repos/janeczku/calibre-web/commits/master \
| jq -r '. | .sha'); \
fi && \
if [ -z ${CALIBRE_RELEASE+x} ]; then \
CALIBRE_RELEASE=$(curl -sX GET "https://api.github.com/repos/janeczku/calibre-web/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/${CALIBRE_RELEASE}.tar.gz && \
mkdir -p \
/app/calibre-web && \
curl -o \
/tmp/calibre-web.tar.gz -L \
https://github.com/janeczku/calibre-web/archive/${CALIBRE_COMMIT}.tar.gz && \
tar xf \
/tmp/calibre-web.tar.gz -C \
/app/calibre-web --strip-components=1 && \
@ -64,8 +36,10 @@ RUN \
pip install --no-cache-dir -U -r \
optional-requirements.txt && \
echo "**** cleanup ****" && \
apk del --purge \
build-dependencies && \
apt-get -y remove \
git \
python-pip && \
apt-get -y autoremove && \
rm -rf \
/tmp/*

View File

@ -1,60 +1,32 @@
FROM lsiobase/python:arm32v7-3.9
FROM lsiobase/ubuntu:arm32v7-bionic
# set version label
ARG BUILD_DATE
ARG VERSION
ARG CALIBRE_COMMIT
ARG CALIBRE_RELEASE
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="chbmb"
RUN \
echo "**** install build packages ****" && \
apk add --no-cache --virtual=build-dependencies \
file \
fontconfig-dev \
freetype-dev \
g++ \
gcc \
ghostscript-dev \
lcms2-dev \
libjpeg-turbo-dev \
libpng-dev \
libtool \
libwebp-dev \
libxml2-dev \
libxslt-dev \
make \
perl-dev \
python2-dev \
tiff-dev \
xz \
zlib-dev && \
apt-get update && \
apt-get install -y \
git \
python-pip && \
echo "**** install runtime packages ****" && \
apk add --no-cache \
fontconfig \
freetype \
ghostscript \
imagemagick6 \
jq \
lcms2 \
libjpeg-turbo \
libltdl \
libpng \
libwebp \
libxml2 \
libxslt \
tiff \
zlib && \
apt-get install -y \
imagemagick \
python-minimal && \
echo "**** install calibre-web ****" && \
if [ -z ${CALIBRE_COMMIT+x} ]; then \
CALIBRE_COMMIT=$(curl -sX GET https://api.github.com/repos/janeczku/calibre-web/commits/master \
| jq -r '. | .sha'); \
fi && \
if [ -z ${CALIBRE_RELEASE+x} ]; then \
CALIBRE_RELEASE=$(curl -sX GET "https://api.github.com/repos/janeczku/calibre-web/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/${CALIBRE_RELEASE}.tar.gz && \
mkdir -p \
/app/calibre-web && \
curl -o \
/tmp/calibre-web.tar.gz -L \
https://github.com/janeczku/calibre-web/archive/${CALIBRE_COMMIT}.tar.gz && \
tar xf \
/tmp/calibre-web.tar.gz -C \
/app/calibre-web --strip-components=1 && \
@ -64,8 +36,10 @@ RUN \
pip install --no-cache-dir -U -r \
optional-requirements.txt && \
echo "**** cleanup ****" && \
apk del --purge \
build-dependencies && \
apt-get -y remove \
git \
python-pip && \
apt-get -y autoremove && \
rm -rf \
/tmp/*
@ -74,4 +48,4 @@ COPY root/ /
# ports and volumes
EXPOSE 8083
VOLUME /books /config
VOLUME /books /config

View File

@ -8,6 +8,7 @@
[[ ! -L /app/calibre-web/app.db ]] && \
ln -s /config/app.db /app/calibre-web/app.db
# create symlinks for log
[[ ! -f /config/calibre-web.log ]] && \
touch /config/calibre-web.log
[[ -f /app/calibre-web/calibre-web.log ]] && \
@ -15,6 +16,13 @@
[[ ! -L /app/calibre-web/calibre-web.log ]] && \
ln -s /config/calibre-web.log /app/calibre-web/calibre-web.log
# Google Drive Integration
[[ ! -f /config/client_secrets.json ]] && \
echo "{}" > /config/client_secrets.json
[[ -f /app/calibre-web/client_secrets.json ]] &&
rm /app/calibre-web/client_secrets.json
[[ ! -L /app/calibre-web/client_secrets.json ]] &&
ln -s /config/client_secrets.json /app/calibre-web/client_secrets.json
# permissions
chown -R abc:abc \