Skip to content

Commit

Permalink
Merge branch 'docker_container_name' into 'develop'
Browse files Browse the repository at this point in the history
story #7078 add branch name to container name

See merge request vitam/vitam!7964

(cherry picked from commit 1fafb7d)

2aab392d add branch name to container name
  • Loading branch information
Loïc Le Roy authored and abdelmoez-guetat committed Jan 8, 2021
1 parent 115dd13 commit 2f207e6
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions dev-deployment/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@
#*******************************************************************************

export VITAMDEV_GIT_REPO="$( cd "$( readlink -f $(dirname ${BASH_SOURCE[0]}) )/.." ; pwd )"
VITAM_CURRENT_BRUNCH="$( git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/' )"

CONTAINER_NAME="dev"
IMAGE_NAME="base"


if [[ $VITAM_CURRENT_BRUNCH == master_* ]]
then
CONTAINER_NAME=${VITAM_CURRENT_BRUNCH}
IMAGE_NAME=${VITAM_CURRENT_BRUNCH}
fi

if [ ${EUID} -eq 0 ]
then
Expand All @@ -51,12 +62,12 @@ fi
echo "Using vitam target : ${VITAM_TARGET}"

VITAMDEV_USER=${LOGNAME}
VITAMDEV_IMAGE=vitam/dev-${VITAM_TARGET}-base
VITAMDEV_CONTAINER=vitam-${VITAM_TARGET}-dev
VITAMDEV_IMAGE=vitam/dev-${VITAM_TARGET}-${IMAGE_NAME}
VITAMDEV_CONTAINER=vitam-${VITAM_TARGET}-${CONTAINER_NAME}

echo "#### VITAM development environment ####"

if [ -z "$(docker ps -a | grep vitam-${VITAM_TARGET}-dev)" ]; then
if [ -z "$(docker ps -a | grep -w vitam-${VITAM_TARGET}-${CONTAINER_NAME})" ]; then
echo "Docker container not found locally ; launching it..."

if [ -z "${VITAMDEV_GIT_REPO}" ] ; then
Expand Down

0 comments on commit 2f207e6

Please sign in to comment.