"Retrieving docker inspect" requires at least 1 argument in bash script

I am trying to check container is up and running in the bash script. I am able to retrieve name of the dockder container but I am facing issue in docker inspect

CONTAINER=sudo docker ps -qf "name=pipeline"
echo $CONTAINER

RUNNING=$(docker inspect -f {{.State.Running}} $CONTAINER 2> /dev/null)
STARTED=$(docker inspect -f {{.State.StartedAt}} $CONTAINER)
NETWORK=$(docker inspect -f {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}} $CONTAINER)
echo "OK - $CONTAINER is running. IP: $NETWORK, StartedAt: $STARTED"

Also tried with the below format

 docker inspect --format='{{.State.StartedAt}}' $CONTAINER) with sudo and without sudo

Running bash script command

 bash ./testing.sh

Error

"docker inspect" requires at least 1 argument.
 See 'docker inspect --help'.
 Usage:  docker inspect [OPTIONS] NAME|ID [NAME|ID...]
 Return low-level information on Docker objects
 Template parsing error: template: :1: unexpected unclosed action in range
 OK -  is running. IP: , StartedAt:

Thank you for your help

Source: Docker Questions