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,6 +41,17 @@ wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/$LI
|
||||
|
||||
chmod a+x $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 \
|
||||
--create-desktop-file \
|
||||
|
@ -8,13 +8,34 @@ echo "CREATING pdf2htmlEX Docker Image"
|
||||
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
|
||||
|
||||
if [ -z "$DOCKER_FROM" ]; then
|
||||
|
||||
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 ""
|
||||
@ -22,9 +43,9 @@ if [ -z "$DOCKER_FROM" ]; then
|
||||
echo "DOCKER_FROM not set... so we can not build the docker image"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$DOCKER_USERNAME" ]; then
|
||||
if [ -z "$DOCKER_USERNAME" ]; then
|
||||
echo ""
|
||||
read -p "Enter a docker username: " DOCKER_USERNAME
|
||||
echo ""
|
||||
@ -32,29 +53,13 @@ if [ -z "$DOCKER_USERNAME" ]; then
|
||||
echo "DOCKER_USERNAME not set... so we can not build the docker image"
|
||||
exit 1
|
||||
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_USERNAME=\"$DOCKER_USERNAME\"" >> 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
|
||||
echo "export DOCKER_FROM=\"$DOCKER_FROM\"" >> buildScripts/reSourceVersionEnvs
|
||||
echo "export DOCKER_USERNAME=\"$DOCKER_USERNAME\"" >> buildScripts/reSourceVersionEnvs
|
||||
echo "export DOCKER_NAME=\"$DOCKER_NAME\"" >> buildScripts/reSourceVersionEnvs
|
||||
|
||||
delete_blacklisted
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user