Ckan docker installation – datastore and datapusher

I was successful in installating ckan using docker compose. The containers are up and running. I am stuck at executing this script:

docker exec ckan /usr/local/bin/ckan-paster --plugin=ckan datastore set-permissions -c /etc/ckan/production.ini | docker exec -i db psql -U ckan

When i execute this, it says : datastore not recognised as a command.

I am using linix vm for installation.

Any idea how to Bypass this error?

Source: Docker Questions