Skip to content

Commit

Permalink
full build test for branched version of mod
Browse files Browse the repository at this point in the history
  • Loading branch information
thelamer committed Jun 13, 2019
1 parent 6ae9c3f commit 77b3ae6
Show file tree
Hide file tree
Showing 13 changed files with 104 additions and 843 deletions.
62 changes: 23 additions & 39 deletions Dockerfile
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/ /
67 changes: 0 additions & 67 deletions Dockerfile.aarch64

This file was deleted.

67 changes: 0 additions & 67 deletions Dockerfile.armhf

This file was deleted.

Loading

0 comments on commit 77b3ae6

Please sign in to comment.