This repository has been archived by the owner on Sep 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhancements to build_imginfo.sh and run_imginfo.sh to enable buildin…
…g of the debug dockerfile and convenient launching (#1383)
- Loading branch information
Showing
2 changed files
with
52 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ function help { | |
Create and build imginfo in the specified directory | ||
Options: | ||
-p use podman instead of docker | ||
-d build debug imginfo | ||
`basename $0` --help|-h | ||
This help | ||
END | ||
|
@@ -16,23 +17,40 @@ if [ -z "$1" ]; then | |
fi | ||
|
||
DOCKER=docker | ||
case $1 in | ||
--help|-h) | ||
help | ||
;; | ||
-p) | ||
DOCKER=podman | ||
shift | ||
;; | ||
*) | ||
while [ -n "$1" ] ; do | ||
case $1 in | ||
--help|-h) | ||
help | ||
;; | ||
-d) | ||
DOCKERFILE=Dockerfile-imginfo-debug | ||
shift | ||
;; | ||
-p) | ||
DOCKER=podman | ||
shift | ||
;; | ||
*) | ||
break | ||
;; | ||
esac | ||
done | ||
if [ -z "$1" ]; then | ||
echo "workspace not specified" | ||
exit 1 | ||
fi | ||
|
||
esac | ||
WORKDIR=$1 | ||
IMGINFO_TAG=9810b92 | ||
[email protected]:githubgphl/imginfo.git | ||
if [ -d ${WORKDIR} ]; then | ||
rm -rf ${WORKDIR} | ||
rm -r ${WORKDIR} | ||
fi | ||
git clone ${IMGINFO_GITHUB} ${WORKDIR} | ||
git checkout ${IMGINFO_TAG} | ||
${DOCKER} build ${WORKDIR} --file ${WORKDIR}/Dockerfile --tag imginfo | ||
if [ -z "$DOCKERFILE" ]; then | ||
DOCKERFILE=${WORKDIR}/Dockerfile | ||
else | ||
DOCKERFILE=${WORKDIR}/${DOCKERFILE} | ||
fi | ||
${DOCKER} build ${WORKDIR} --file ${DOCKERFILE} --tag imginfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters