Add all the environment variable otherwise it will show Error Connecting with the database
docker build -t my-wordpress
docker run -p 8000:80 -d --env-file .env my-wordpress
docker stop <container_id>
docker start <container_id>
docker logs <container_id>