cleanup changes and formatting

This commit is contained in:
thelamer 2019-06-04 20:48:24 -07:00
parent a9ae6f095c
commit 823ae24b84
6 changed files with 97 additions and 93 deletions

View File

@ -9,21 +9,21 @@ LABEL maintainer="chbmb"
RUN \ RUN \
echo "**** install build packages ****" && \ echo "**** install build packages ****" && \
apt-get update && \ apt-get update && \
apt-get install -y \ apt-get install -y \
git \ git \
python-pip && \ python-pip && \
echo "**** install runtime packages ****" && \ echo "**** install runtime packages ****" && \
apt-get install -y \ apt-get install -y \
imagemagick \ imagemagick \
python-minimal && \ python-minimal && \
echo "**** install calibre-web ****" && \ echo "**** install calibre-web ****" && \
if [ -z ${CALIBREWEB_RELEASE+x} ]; then \ if [ -z ${CALIBREWEB_RELEASE+x} ]; then \
CALIBREWEB_RELEASE=$(curl -sX GET "https://api.github.com/repos/janeczku/calibre-web/releases/latest" \ CALIBREWEB_RELEASE=$(curl -sX GET "https://api.github.com/repos/janeczku/calibre-web/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \ | awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \ fi && \
curl -o \ curl -o \
/tmp/calibre-web.tar.gz -L \ /tmp/calibre-web.tar.gz -L \
https://github.com/janeczku/calibre-web/archive/${CALIBREWEB_RELEASE}.tar.gz && \ https://github.com/janeczku/calibre-web/archive/${CALIBREWEB_RELEASE}.tar.gz && \
mkdir -p \ mkdir -p \
/app/calibre-web && \ /app/calibre-web && \
@ -36,12 +36,14 @@ RUN \
pip install --no-cache-dir -U -r \ pip install --no-cache-dir -U -r \
optional-requirements.txt && \ optional-requirements.txt && \
echo "**** cleanup ****" && \ echo "**** cleanup ****" && \
apt-get -y remove \ apt-get -y purge \
git \ git \
python-pip && \ python-pip && \
apt-get -y autoremove && \ apt-get -y autoremove && \
rm -rf \ rm -rf \
/tmp/* /tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
# add local files # add local files
COPY root/ / COPY root/ /

View File

@ -9,28 +9,28 @@ LABEL maintainer="chbmb"
RUN \ RUN \
echo "**** install build packages ****" && \ echo "**** install build packages ****" && \
apt-get update && \ apt-get update && \
apt-get install -y \ apt-get install -y \
g++ \ g++ \
gcc \ gcc \
git \ git \
libffi-dev \ libffi-dev \
libjpeg-dev \ libjpeg-dev \
libxml2-dev \ libxml2-dev \
libxslt1-dev \ libxslt1-dev \
python-pip \ python-pip \
zlib1g-dev && \ zlib1g-dev && \
echo "**** install runtime packages ****" && \ echo "**** install runtime packages ****" && \
apt-get install -y \ apt-get install -y \
imagemagick \ imagemagick \
python-minimal && \ python-minimal && \
echo "**** install calibre-web ****" && \ echo "**** install calibre-web ****" && \
if [ -z ${CALIBREWEB_RELEASE+x} ]; then \ if [ -z ${CALIBREWEB_RELEASE+x} ]; then \
CALIBREWEB_RELEASE=$(curl -sX GET "https://api.github.com/repos/janeczku/calibre-web/releases/latest" \ CALIBREWEB_RELEASE=$(curl -sX GET "https://api.github.com/repos/janeczku/calibre-web/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \ | awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \ fi && \
curl -o \ curl -o \
/tmp/calibre-web.tar.gz -L \ /tmp/calibre-web.tar.gz -L \
https://github.com/janeczku/calibre-web/archive/${CALIBREWEB_RELEASE}.tar.gz && \ https://github.com/janeczku/calibre-web/archive/${CALIBREWEB_RELEASE}.tar.gz && \
mkdir -p \ mkdir -p \
/app/calibre-web && \ /app/calibre-web && \
@ -43,19 +43,21 @@ RUN \
pip install --no-cache-dir -U -r \ pip install --no-cache-dir -U -r \
optional-requirements.txt && \ optional-requirements.txt && \
echo "**** cleanup ****" && \ echo "**** cleanup ****" && \
apt-get -y remove \ apt-get -y purge \
g++ \ g++ \
gcc \ gcc \
git \ git \
libffi-dev \ libffi-dev \
libjpeg-dev \ libjpeg-dev \
libxml2-dev \ libxml2-dev \
libxslt1-dev \ libxslt1-dev \
python-pip \ python-pip \
zlib1g-dev && \ zlib1g-dev && \
apt-get -y autoremove && \ apt-get -y autoremove && \
rm -rf \ rm -rf \
/tmp/* /tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
# add local files # add local files
COPY root/ / COPY root/ /

View File

@ -9,28 +9,28 @@ LABEL maintainer="chbmb"
RUN \ RUN \
echo "**** install build packages ****" && \ echo "**** install build packages ****" && \
apt-get update && \ apt-get update && \
apt-get install -y \ apt-get install -y \
g++ \ g++ \
gcc \ gcc \
git \ git \
libffi-dev \ libffi-dev \
libjpeg-dev \ libjpeg-dev \
libxml2-dev \ libxml2-dev \
libxslt1-dev \ libxslt1-dev \
python-pip \ python-pip \
zlib1g-dev && \ zlib1g-dev && \
echo "**** install runtime packages ****" && \ echo "**** install runtime packages ****" && \
apt-get install -y \ apt-get install -y \
imagemagick \ imagemagick \
python-minimal && \ python-minimal && \
echo "**** install calibre-web ****" && \ echo "**** install calibre-web ****" && \
if [ -z ${CALIBREWEB_RELEASE+x} ]; then \ if [ -z ${CALIBREWEB_RELEASE+x} ]; then \
CALIBREWEB_RELEASE=$(curl -sX GET "https://api.github.com/repos/janeczku/calibre-web/releases/latest" \ CALIBREWEB_RELEASE=$(curl -sX GET "https://api.github.com/repos/janeczku/calibre-web/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \ | awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \ fi && \
curl -o \ curl -o \
/tmp/calibre-web.tar.gz -L \ /tmp/calibre-web.tar.gz -L \
https://github.com/janeczku/calibre-web/archive/${CALIBREWEB_RELEASE}.tar.gz && \ https://github.com/janeczku/calibre-web/archive/${CALIBREWEB_RELEASE}.tar.gz && \
mkdir -p \ mkdir -p \
/app/calibre-web && \ /app/calibre-web && \
@ -43,19 +43,25 @@ RUN \
pip install --no-cache-dir -U -r \ pip install --no-cache-dir -U -r \
optional-requirements.txt && \ optional-requirements.txt && \
echo "**** cleanup ****" && \ echo "**** cleanup ****" && \
apt-get -y remove \ apt-get -y purge \
g++ \ g++ \
gcc \ gcc \
git \ git \
libffi-dev \ libffi-dev \
libjpeg-dev \ libjpeg-dev \
libxml2-dev \ libxml2-dev \
libxslt1-dev \ libxslt1-dev \
python-pip \ python-pip \
zlib1g-dev && \ zlib1g-dev && \
apt-get -y autoremove && \ apt-get -y autoremove && \
rm -rf \ rm -rf \
/tmp/* /tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
# add local files # add local files
COPY root/ / COPY root/ /
# ports and volumes
EXPOSE 8083
VOLUME /books /config

1
Jenkinsfile vendored
View File

@ -475,6 +475,7 @@ pipeline {
docker tag lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG} docker tag lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG}
fi fi
docker run --rm \ docker run --rm \
--shm-size=1gb \
-v /var/run/docker.sock:/var/run/docker.sock \ -v /var/run/docker.sock:/var/run/docker.sock \
-e IMAGE=\"${IMAGE}\" \ -e IMAGE=\"${IMAGE}\" \
-e DELAY_START=\"${CI_DELAY}\" \ -e DELAY_START=\"${CI_DELAY}\" \

View File

@ -9,7 +9,6 @@ project_blurb: |
[{{ project_name|capitalize }}]({{ project_url }}) is a web app providing a clean interface for browsing, reading and downloading eBooks using an existing Calibre database. It is also possible to integrate google drive and edit metadata and your calibre library through the app itself. [{{ project_name|capitalize }}]({{ project_url }}) is a web app providing a clean interface for browsing, reading and downloading eBooks using an existing Calibre database. It is also possible to integrate google drive and edit metadata and your calibre library through the app itself.
This software is a fork of library and licensed under the GPL v3 License. This software is a fork of library and licensed under the GPL v3 License.
project_blurb_optional_extras_enabled: false
# supported architectures # supported architectures
available_architectures: available_architectures:
@ -17,13 +16,9 @@ available_architectures:
- { arch: "{{ arch_arm64 }}", tag: "arm64v8-latest"} - { arch: "{{ arch_arm64 }}", tag: "arm64v8-latest"}
- { arch: "{{ arch_armhf }}", tag: "arm32v7-latest"} - { arch: "{{ arch_armhf }}", tag: "arm32v7-latest"}
# development version
development_versions: false
# container parameters # container parameters
common_param_env_vars_enabled: true common_param_env_vars_enabled: true
param_container_name: "{{ project_name }}" param_container_name: "{{ project_name }}"
param_usage_include_net: false
param_usage_include_env: true param_usage_include_env: true
param_env_vars: param_env_vars:
- { env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use EG Europe/London." } - { env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use EG Europe/London." }
@ -34,8 +29,6 @@ param_volumes:
param_usage_include_ports: true param_usage_include_ports: true
param_ports: param_ports:
- { external_port: "8083", internal_port: "8083", port_desc: "WebUI" } - { external_port: "8083", internal_port: "8083", port_desc: "WebUI" }
param_device_map: false
cap_add_param: false
# optional container parameters # optional container parameters
opt_param_usage_include_env: false opt_param_usage_include_env: false

View File

@ -18,11 +18,11 @@
# create Google drive client_secrets.json file # create Google drive client_secrets.json file
[[ ! -f /config/client_secrets.json ]] && \ [[ ! -f /config/client_secrets.json ]] && \
echo "{}" > /config/client_secrets.json echo "{}" > /config/client_secrets.json
[[ -f /app/calibre-web/client_secrets.json ]] && [[ -f /app/calibre-web/client_secrets.json ]] &&
rm /app/calibre-web/client_secrets.json rm /app/calibre-web/client_secrets.json
[[ ! -L /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 ln -s /config/client_secrets.json /app/calibre-web/client_secrets.json
# create Google drive symlinks for database # create Google drive symlinks for database
[[ ! -f /config/gdrive.db ]] && \ [[ ! -f /config/gdrive.db ]] && \