Need help to understand the below shell script

Please help me to understand the below 3 lines of code.execute shell in jenkins

1)

APP_IP=$( docker inspect --format '{{ .NetworkSettings.Networks.'"$DOCKER_NETWORK_NAME"'.IPAddress }}' ${PROJECT_NAME_KEY}"-CI" )

2)

HOST_WORKSPACE=$(echo ${WORKSPACE} | sed 's#/workspace#/var/lib/docker/volumes/jenkins_slave_home/_data#')

3)

docker run --rm -t --net=${DOCKER_NETWORK_NAME} \
-v ${HOST_WORKSPACE}:/zap/wrk/:rw \
iniweb/owasp-zap2docker-stable:2.5.0 zap-baseline.py -s -r zap-test-report.html -t ${APP_URL} || exit 0

1) This puts the output from the command

docker inspect --format '{{ .NetworkSettings.Networks.'"$DOCKER_NETWORK_NAME"'.IPAddress }}' ${PROJECT_NAME_KEY}"-CI"

...into the variable APP_IP.

2) This prints the value of the variable WORKSPACE into sed, which replaces the text "/workspace" with "/var/lib/docker/volumes/jenkins_slave_home/_data", and places the result into the variable HOST_WORKSPACE.

3) This runs docker with the given parameters, and if it returns an error code, quits the script immediately (with no error result, oddly.)

Docker itself is a commercial product which is difficult for me to say much about.