Docker Container Not Found During Deployment to EC2 Intance Step

Hi folks,

I tried running a job build to build and push a docker image to docker hub and deploy the docker image to an AWS EC2 Instance. The build and push the image step was a success; however, the deployment step failed with the following error message:

#!/bin/bash -eo pipefail
if [ CIRCLE_BRANCH = 'staging' ]; then ssh -o StrictHostKeyChecking=no {STAGING_SSH_USER}@${STAGING_IP} “/bin/bash ~/deploy/docker.sh
$DOCKER_ORG/$IMAGE_NAME:$TAG $IMAGE_NAME $DOCKER_LOGIN $DOCKER_PWD”
fi
if [ CIRCLE_BRANCH = 'production' ]; then ssh -o StrictHostKeyChecking=no {PRODUCTION_SSH_USER}@${PRODUCTION_IP} “/bin/bash ~/deploy/docker.sh
$DOCKER_ORG/$IMAGE_NAME:$TAG $IMAGE_NAME $DOCKER_LOGIN $DOCKER_PWD”
fi
Warning: Permanently added ‘**************’ (ECDSA) to the list of known hosts.

[ERROR] You must supply a Docker image, container, login and password
sh: 2: ***************/core-api-staging:1.0.19: not found

Exited with code exit status 127

I have no idea what the error message means. I printed out the environmental variables during debugging and saw all the four required input variables.

Thank you in anticipation of your most valued assistance.

Kind regards,
Faithman