Skip to content

Commit 492a7fb

Browse files
committed
force remove the containers fore starting
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]>
1 parent f7f59b2 commit 492a7fb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

run.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,22 +152,22 @@ if [ "${COMMAND}" = "start" ]; then
152152
# Start Docker container
153153
if [ "${IMAGE_TYPE}" = "standalone" ]; then
154154
IMG_NAME=$(echo "${PREFIX}-${ASIC_TYPE}-${TARGET}" | tr '[:upper:]' '[:lower:]')
155-
docker rm ${IMG_NAME}-run
155+
docker rm -f ${IMG_NAME}-run
156156
docker run --name ${IMG_NAME}-run \
157157
-v $(pwd):/sai-challenger \
158158
--cap-add=NET_ADMIN \
159159
${OPTS} \
160160
--device /dev/net/tun:/dev/net/tun \
161161
-d ${IMG_NAME}
162162
elif [ "${IMAGE_TYPE}" = "server" ]; then
163-
docker rm sc-server-${ASIC_TYPE}-${TARGET}-run
163+
docker rm -f sc-server-${ASIC_TYPE}-${TARGET}-run
164164
docker run --name sc-server-${ASIC_TYPE}-${TARGET}-run \
165165
--cap-add=NET_ADMIN \
166166
${OPTS} \
167167
--device /dev/net/tun:/dev/net/tun \
168168
-d sc-server-${ASIC_TYPE}-${TARGET}
169169
else
170-
docker rm ${PREFIX}-client-run
170+
docker rm -f ${PREFIX}-client-run
171171
docker run --name ${PREFIX}-client-run \
172172
-v $(pwd):/sai-challenger \
173173
--cap-add=NET_ADMIN \

0 commit comments

Comments
 (0)