mirror of
https://github.com/jtesta/ssh-audit.git
synced 2024-12-22 22:15:22 +01:00
Added --rm to docker run commands so stopped containers are automatically removed.
This commit is contained in:
parent
02ab487232
commit
2809ff464a
@ -456,9 +456,9 @@ run_test() {
|
|||||||
test_name="TinySSH ${version} ${test_number}"
|
test_name="TinySSH ${version} ${test_number}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cid=$(docker run -d -p 2222:22 "${IMAGE_NAME}:${IMAGE_VERSION}" ${server_exec})
|
#echo "Running: docker run --rm -d -p 2222:22 $IMAGE_NAME:$IMAGE_VERSION ${server_exec}"
|
||||||
|
cid=$(docker run --rm -d -p 2222:22 "${IMAGE_NAME}:${IMAGE_VERSION}" ${server_exec})
|
||||||
retval=$?
|
retval=$?
|
||||||
#echo "Running: docker run -d -p 2222:22 $IMAGE_NAME:$IMAGE_VERSION ${server_exec}"
|
|
||||||
if [[ ${retval} != 0 ]]; then
|
if [[ ${retval} != 0 ]]; then
|
||||||
echo -e "${REDB}Failed to run docker image! (exit code: ${retval})${CLR}"
|
echo -e "${REDB}Failed to run docker image! (exit code: ${retval})${CLR}"
|
||||||
exit 1
|
exit 1
|
||||||
@ -603,8 +603,8 @@ run_policy_test() {
|
|||||||
expected_exit_code=$6
|
expected_exit_code=$6
|
||||||
|
|
||||||
|
|
||||||
#echo "Running: docker run -d -p 2222:22 $IMAGE_NAME:$IMAGE_VERSION ${server_exec}"
|
#echo "Running: docker run --rm -d -p 2222:22 $IMAGE_NAME:$IMAGE_VERSION ${server_exec}"
|
||||||
cid=$(docker run -d -p 2222:22 "${IMAGE_NAME}:${IMAGE_VERSION}" ${server_exec})
|
cid=$(docker run --rm -d -p 2222:22 "${IMAGE_NAME}:${IMAGE_VERSION}" ${server_exec})
|
||||||
retval=$?
|
retval=$?
|
||||||
if [[ ${retval} != 0 ]]; then
|
if [[ ${retval} != 0 ]]; then
|
||||||
echo -e "${REDB}Failed to run docker image! (exit code: ${retval})${CLR}"
|
echo -e "${REDB}Failed to run docker image! (exit code: ${retval})${CLR}"
|
||||||
|
Loading…
Reference in New Issue
Block a user