mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Possiblity to choose between docker and podman from the command line (#5217)
* Possiblity to choose between docker and podman from the command line * Update docker.sh
This commit is contained in:
parent
953f5b81ed
commit
eec43a4c53
17
ui/docker.sh
17
ui/docker.sh
@ -29,5 +29,20 @@ DATE="$(date --iso-8601=seconds)"
|
|||||||
LABEL_DATE="--label \"org.opencontainers.image.created=${DATE}\""
|
LABEL_DATE="--label \"org.opencontainers.image.created=${DATE}\""
|
||||||
GIT_REV="$(git rev-parse HEAD)"
|
GIT_REV="$(git rev-parse HEAD)"
|
||||||
LABEL_GIT_REV="--label \"org.opencontainers.image.revision=${GIT_REV}\""
|
LABEL_GIT_REV="--label \"org.opencontainers.image.revision=${GIT_REV}\""
|
||||||
|
USE_PODMAN=0
|
||||||
|
USE_DOCKER=0
|
||||||
|
OPTIONS='pd'
|
||||||
|
while getopts $OPTIONS OPTION
|
||||||
|
do
|
||||||
|
case "$OPTION" in
|
||||||
|
p)USE_PODMAN=1;;
|
||||||
|
d)USE_DOCKER=1;;
|
||||||
|
*)echo "Please choose between -p for podman or -d for docker."
|
||||||
|
exit;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
if [[ $USE_PODMAN -eq 1 ]]; then
|
||||||
|
podman build -t cloudstack-ui ${LABEL_DATE} ${LABEL_GIT_REV} ${LABEL_GIT_TAG} .
|
||||||
|
exit
|
||||||
|
fi
|
||||||
docker build -t cloudstack-ui ${LABEL_DATE} ${LABEL_GIT_REV} ${LABEL_GIT_TAG} .
|
docker build -t cloudstack-ui ${LABEL_DATE} ${LABEL_GIT_REV} ${LABEL_GIT_TAG} .
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user