Reputation: 941
I keep getting an error when I try to run my docker command.
The error I keep getting is: docker: invalid reference format: repository name must be lowercase.
The command I am running is:
docker run
-itd
--name media-planner-api-qa
--restart=always
-v /home/prj/media_planner_api_logs:/media-planner-api/logs
-e ENVIRONMENT=qa
-e FLASK_APP=index.py
-e DEBUG=False
-e PROFILE=True
-e LOCAL_S1_API_ENV=sa1qa21
-e QA_S1_API_ENV=$QA_S1_API_ENV
-e PROD_S1_API_ENV=s1
-e S1_API_BASE_URL=sa1qa21
-e SERVICE_EMAIL=$SERVICE_EMAIL
-e SERVICE_NAME=$SERVICE_NAME
-e SMTP_HOST=$SMTP_HOST
-e SMTP_USERNAME=$SMTP_USERNAME
-e SMTP_PASSWORD=$SMTP_PASSWORD
-e SMTP_PORT=$SMTP_PORT
-e SMTP_LOCAL=0
-e WORKER_USERNAME=$WORKER_USERNAME
-e WORKER_PASSWORD=$WORKER_PASSWORD
-e AUTH0_CLIENTID_FC=$AUTH0_CLIENTID_FC_QA
-e AUTH0_SECRET_FC=$AUTH0_SECRET_FC_QA
-e [email protected]
-p 4000:4000
--network='host'
72343423423423.dkr.ecr.us-east-1.amazonaws.com/prj/media-planner-api-qa:latest
Thanks
Upvotes: 10
Views: 17987
Reputation: 9407
Another cause of this is if you forget to add the -e flag when specifying one of the environment variables:
docker run -p 8080:8080 -e MYSQL_USERNAME='user'
MYSQL_PASSWORD='pass'
-e MYSQL_HOST='host'
-e MYSQL_DATABASE='database'
account-id.dkr.ecr.region.amazonaws.com/repo-name
Upvotes: 0