How do I run a CKAN docker image?

I have been trying for several days now to run CKAN as a docker image. The official CKAN documentation explains in detail how to create your own docker image via "docker-compose". The basic workflow is:

  1. Clone the CKAN source files from GitHub
  2. Make some changes in the "docker-compose.yml" file (custom passwords, extensions, etc)
  3. Run "docker-compose"

This gives you a running CKAN docker container together with all the necessary databases and search engines.

My ultimate goal however is to push this CKAN docker image to Docker-Hub and to run it on other machines via "docker run". I want to use this apporach because I want to extensively modify the original CKAN installation, and also add custom datasets, groups and organizations to the running catalog before pushing it to docker hub. "Docker run" seems to be much easier and more convenient compared to using "Docker compose".

The problem is: Whenever I try to run the CKAN container using the commands below I end up with the following error:

$ docker run -d --name db ckan/postgresql
$ docker run -d --name solr ckan/solr
$ docker run -d -p 80:80 --link db:db --link solr:solr ckan/ckan

ERROR: no CKAN_SQLALCHEMY_URL specified in docker-compose.yml

The CKAN_SQLALCHEMY_URL is definitely present in the docker-compose.yml file. Setting this variable as global PATH variable in windows did not help either. I also tried different versions of the CKAN source. Since the CKAN documentation only explains how to use "docker-compose" and not how to use "docker run", I suspect that "docker run" is simply not possible. If this is true, why is there a official CKAN image on the Docker Hub? (This throws the exact same error as if I build the image myself using "docker-compose") What is the purpose of this image on the Docker Hub if it can’t be used?

Is there any way to "docker run" the CKAN image once it is built?

Thanks!

Source: Docker Questions