Skip to content

Commit

Permalink
Remove old container
Browse files Browse the repository at this point in the history
  • Loading branch information
baszoetekouw committed Jun 11, 2024
1 parent 26d89ec commit d65e2db
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions run_sram_monitoring.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,14 @@ if [ ! -f ${ENV}.yml ]; then
exit 1
fi

echo "Stopping container"
docker container rm -f browser || true
echo "Starting $BROWSER container"
if [ "$BROWSER" = "chrome" ]; then
docker run --shm-size=2g --rm -d --name browser -p 4444:4444 -p 7900:7900 selenium/standalone-chrome >/dev/null 2>&1
fi
if [ "$BROWSER" = "firefox" ]; then
docker run --shm-size=2g --rm -d --name browser -p 4444:4444 -p 7900:7900 selenium/standalone-firefox >/dev/null 2>&1
fi
docker run --shm-size=2g --rm -d --name browser -p 4444:4444 -p 7900:7900 selenium/standalone-${BROWSER}

i=0
while ! curl --output /dev/null --silent --head http://localhost:4444/wd/hub/status; do
while ! curl --output /dev/null --silent --head http://localhost:4444/wd/hub/status
do
echo -n "."
sleep 1
i=$(( $i + 1 ))
Expand Down Expand Up @@ -62,4 +60,5 @@ cat ${LOGFILE}.new
mv ${LOGFILE}.new ${LOGFILE}

docker stop browser >/dev/null 2>&1
docker container rm browser >/dev/null 2>&1
echo "End of $BROWSER test"

0 comments on commit d65e2db

Please sign in to comment.