mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 04:50:09 +00:00
updated createAppImage and createDockerImage scripts to be able to work inside a docker container
This commit is contained in:
parent
1456c255bf
commit
124cae5d21
@ -41,11 +41,22 @@ wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/$LI
|
|||||||
|
|
||||||
chmod a+x $LINUX_DEPLOY_APP_IMAGE
|
chmod a+x $LINUX_DEPLOY_APP_IMAGE
|
||||||
|
|
||||||
./$LINUX_DEPLOY_APP_IMAGE \
|
if [ -f /.dockerenv ] ; then
|
||||||
|
# WE ARE INSIDE A DOCKER CONTAINER...
|
||||||
|
#
|
||||||
|
# We explicilty extract the appimage to a squashfs to allow it to be used
|
||||||
|
# inside Docker containers
|
||||||
|
#
|
||||||
|
./$LINUX_DEPLOY_APP_IMAGE --appimage-extract
|
||||||
|
#
|
||||||
|
LINUX_DEPLOY_APP_IMAGE=squashfs-root/AppRun
|
||||||
|
fi
|
||||||
|
|
||||||
|
./$LINUX_DEPLOY_APP_IMAGE \
|
||||||
-e appDir/$PDF2HTMLEX_PREFIX/bin/pdf2htmlEX \
|
-e appDir/$PDF2HTMLEX_PREFIX/bin/pdf2htmlEX \
|
||||||
--create-desktop-file \
|
--create-desktop-file \
|
||||||
-i ../pdf2htmlEX/logo/pdf2htmlEX.svg \
|
-i ../pdf2htmlEX/logo/pdf2htmlEX.svg \
|
||||||
--appdir=appDir \
|
--appdir=appDir \
|
||||||
--output appimage
|
--output appimage
|
||||||
|
|
||||||
|
|
||||||
|
@ -8,53 +8,58 @@ echo "CREATING pdf2htmlEX Docker Image"
|
|||||||
echo "-------------------------------------------------------------------"
|
echo "-------------------------------------------------------------------"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
if [ -x "$(which docker)" ]; then
|
# Collect everything that will be needed...
|
||||||
|
|
||||||
source buildScripts/reSourceVersionEnvs
|
source buildScripts/reSourceVersionEnvs
|
||||||
|
|
||||||
source buildScripts/dockerFunctions
|
source buildScripts/dockerFunctions
|
||||||
|
|
||||||
|
|
||||||
|
mkdir -p imageBuild/dockerDir
|
||||||
|
|
||||||
|
cd pdf2htmlEX/build
|
||||||
|
|
||||||
|
sudo rm -rf install_manifest.txt
|
||||||
|
|
||||||
|
make install DESTDIR=../../imageBuild/dockerDir
|
||||||
|
|
||||||
|
cd ../../poppler-data
|
||||||
|
|
||||||
|
make install prefix=$PDF2HTMLEX_PREFIX DESTDIR=../imageBuild/dockerDir
|
||||||
|
|
||||||
|
cd ../imageBuild/dockerDir
|
||||||
|
|
||||||
|
copy_deps
|
||||||
|
|
||||||
|
# Now. IF we have docker, THEN build the docker image...
|
||||||
|
|
||||||
|
if [ -x "$(which docker)" ]; then
|
||||||
|
|
||||||
if [ -z "$DOCKER_FROM" ]; then
|
|
||||||
echo ""
|
|
||||||
read -p "Enter the docker image for the 'from' base: " DOCKER_FROM
|
|
||||||
echo ""
|
|
||||||
if [ -z "$DOCKER_FROM" ]; then
|
if [ -z "$DOCKER_FROM" ]; then
|
||||||
echo "DOCKER_FROM not set... so we can not build the docker image"
|
echo ""
|
||||||
exit 1
|
read -p "Enter the docker image for the 'from' base: " DOCKER_FROM
|
||||||
|
echo ""
|
||||||
|
if [ -z "$DOCKER_FROM" ]; then
|
||||||
|
echo "DOCKER_FROM not set... so we can not build the docker image"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$DOCKER_USERNAME" ]; then
|
|
||||||
echo ""
|
|
||||||
read -p "Enter a docker username: " DOCKER_USERNAME
|
|
||||||
echo ""
|
|
||||||
if [ -z "$DOCKER_USERNAME" ]; then
|
if [ -z "$DOCKER_USERNAME" ]; then
|
||||||
echo "DOCKER_USERNAME not set... so we can not build the docker image"
|
echo ""
|
||||||
exit 1
|
read -p "Enter a docker username: " DOCKER_USERNAME
|
||||||
|
echo ""
|
||||||
|
if [ -z "$DOCKER_USERNAME" ]; then
|
||||||
|
echo "DOCKER_USERNAME not set... so we can not build the docker image"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
export DOCKER_NAME="$DOCKER_USERNAME/pdf2htmlex:$PDF2HTMLEX_BRANCH-$BUILD_TIME"
|
export DOCKER_NAME="$DOCKER_USERNAME/pdf2htmlex:$PDF2HTMLEX_BRANCH-$BUILD_TIME"
|
||||||
|
|
||||||
echo "export DOCKER_FROM=\"$DOCKER_FROM\"" >> buildScripts/reSourceVersionEnvs
|
echo "export DOCKER_FROM=\"$DOCKER_FROM\"" >> buildScripts/reSourceVersionEnvs
|
||||||
echo "export DOCKER_USERNAME=\"$DOCKER_USERNAME\"" >> buildScripts/reSourceVersionEnvs
|
echo "export DOCKER_USERNAME=\"$DOCKER_USERNAME\"" >> buildScripts/reSourceVersionEnvs
|
||||||
echo "export DOCKER_NAME=\"$DOCKER_NAME\"" >> buildScripts/reSourceVersionEnvs
|
echo "export DOCKER_NAME=\"$DOCKER_NAME\"" >> buildScripts/reSourceVersionEnvs
|
||||||
|
|
||||||
mkdir -p imageBuild/dockerDir
|
|
||||||
|
|
||||||
cd pdf2htmlEX/build
|
|
||||||
|
|
||||||
sudo rm -rf install_manifest.txt
|
|
||||||
|
|
||||||
make install DESTDIR=../../imageBuild/dockerDir
|
|
||||||
|
|
||||||
cd ../../poppler-data
|
|
||||||
|
|
||||||
make install prefix=$PDF2HTMLEX_PREFIX DESTDIR=../imageBuild/dockerDir
|
|
||||||
|
|
||||||
cd ../imageBuild/dockerDir
|
|
||||||
|
|
||||||
copy_deps
|
|
||||||
|
|
||||||
delete_blacklisted
|
delete_blacklisted
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user