1

I was trying to install Apache MADLib on Postgres. Having difficulty with YUM approach I moved to Docker approach as suggested by this website https://pgxn.org/dist/madlib/

I was able to pull docker image as suggested at para 1. Now at para 2 I am stuck with comment "Path to incubator-madlib directory". I am not able to understand whether it should be the URL to MADLib Incubator such as "https://github.com/apache/incubator-madlib" or it should refer to local disk area. It would be great by giving an example of how to run this command.

2) Launch a container corresponding to the MADlib image, mounting the source code folder to the container:

docker run -d -it --name madlib \ -v (path to incubator-madlib directory):/incubator-madlib/ madlib/postgres_9.6 
BB23850
  • 109
  • 1
  • 11

2 Answers2

1

The (path to incubator-madlib directory) refers to wherever you have git cloned the MADlib code base to on your machine. Say for example, your home directory in your machine is /home/xyz/ and you have cloned the MADlib code base there, you should have a directory called /home/xyz/incubator-madlib. You can now run the docker command documented in the MADlib repo as follows:

docker run -d -it --name madlib -v /home/xyz/incubator-madlib/:/incubator-madlib/ madlib/postgres_9.6

You were probably getting the Permission denied docker:... error after trying Robert's suggestion because the $(pwd) was not referring to your incubator-madlib source code folder, but was referring to /var/lib/docker/devicemapper/devicemapper/data, which should not be the case. In any case, it might be a better idea to provide the incubator-madlib directory's absolute path in the docker command, as specified above.

0

As is documented, that is the directory on your computer where the source code resides:

where incubator-madlib is the directory where the MADlib source code resides.

So, supossing that you have downloaded the source code in ./incubator-madlib, run as this:

docker run -d -it --name madlib -v $(pwd)/incubator-madlib:/incubator-madlib/ madlib/postgres_9.6 

Then see what the container logs:

docker logs -f madlib
Robert
  • 33,429
  • 8
  • 90
  • 94
  • Hi Robert, Thanks for a quick reply. Please note that I am neewbee to docker. I want to quickly get madlib up and running. Been trying for 48 hours. I used same command as given in Para-1 viz.,: 1) Pull down the madlib/postgres_9.6:latest image from docker hub: docker pull madlib/postgres_9.6:latest It should have gone to default location. Using the command: docker run -d -it --name madlib -v $(/var/lib/docker/devicemapper/devicemapper/data):/incubator-madlib/ madlib/postgres_9.6 Error: Permission denied docker: invalid reference format See 'docker run --help' – BB23850 Jun 26 '17 at 05:40