1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-12-22 13:00:08 +00:00

check for existing docker commands before trying to create docker

This commit is contained in:
Stephen Gaito 2019-11-26 07:52:30 +00:00
parent c4a7a9fb03
commit ca690632e9

View File

@ -2,33 +2,38 @@
# This bash script creates a docker image from an existing pdf2htmlEX # This bash script creates a docker image from an existing pdf2htmlEX
source buildScripts/versionEnvs if [ -x "$(which docker)" ]; then
source buildScripts/dockerFunctions source buildScripts/versionEnvs
mkdir -p imageBuild/dockerDir source buildScripts/dockerFunctions
cd pdf2htmlEX/build mkdir -p imageBuild/dockerDir
sudo rm -rf install_manifest.txt cd pdf2htmlEX/build
make install DESTDIR=../../imageBuild/dockerDir sudo rm -rf install_manifest.txt
cd ../../imageBuild/dockerDir make install DESTDIR=../../imageBuild/dockerDir
copy_deps cd ../../imageBuild/dockerDir
delete_blacklisted copy_deps
cat >> Dockerfile <<DOCKERFILE_HERE_DOC delete_blacklisted
cat >> Dockerfile <<DOCKERFILE_HERE_DOC
FROM $DOCKER_FROM FROM $DOCKER_FROM
COPY ./ / COPY ./ /
RUN ldconfig RUN ldconfig
ENTRYPOINT ["/usr/bin/pdf2htmlEX"] ENTRYPOINT ["/usr/bin/pdf2htmlEX"]
DOCKERFILE_HERE_DOC DOCKERFILE_HERE_DOC
cd .. cd ..
docker build -t stephengaito/pdf2htmlex:test-`date +%Y%m%d-%H.%M.%S` dockerDir docker build -t stephengaito/pdf2htmlex:test-`date +%Y%m%d-%H.%M.%S` dockerDir
else
echo "Docker is not installed... skipping creation of a docker image."
fi