Skip to content

Commit

Permalink
force remove the containers fore starting
Browse files Browse the repository at this point in the history
add -f flag to rm command to make sure container gets removed even if it is not stopped

alternatively we could stop it before rm

Signed-off-by: Mircea Dan <[email protected]>
  • Loading branch information
mgheorghe committed May 5, 2023
1 parent f7f59b2 commit 492a7fb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -152,22 +152,22 @@ if [ "${COMMAND}" = "start" ]; then
# Start Docker container
if [ "${IMAGE_TYPE}" = "standalone" ]; then
IMG_NAME=$(echo "${PREFIX}-${ASIC_TYPE}-${TARGET}" | tr '[:upper:]' '[:lower:]')
docker rm ${IMG_NAME}-run
docker rm -f ${IMG_NAME}-run
docker run --name ${IMG_NAME}-run \
-v $(pwd):/sai-challenger \
--cap-add=NET_ADMIN \
${OPTS} \
--device /dev/net/tun:/dev/net/tun \
-d ${IMG_NAME}
elif [ "${IMAGE_TYPE}" = "server" ]; then
docker rm sc-server-${ASIC_TYPE}-${TARGET}-run
docker rm -f sc-server-${ASIC_TYPE}-${TARGET}-run
docker run --name sc-server-${ASIC_TYPE}-${TARGET}-run \
--cap-add=NET_ADMIN \
${OPTS} \
--device /dev/net/tun:/dev/net/tun \
-d sc-server-${ASIC_TYPE}-${TARGET}
else
docker rm ${PREFIX}-client-run
docker rm -f ${PREFIX}-client-run
docker run --name ${PREFIX}-client-run \
-v $(pwd):/sai-challenger \
--cap-add=NET_ADMIN \
Expand Down

0 comments on commit 492a7fb

Please sign in to comment.