I used to use PDAL with conda environment, and in that time I used pipeline command with the simple:

 sudo pdal pipeline -i /Documents/laz2pg.txt

And that did the work. But, now, at the moment, I have to use PDAL which is installed with Docker environment and I have trouble because I don't really know anything about docker. I find out that the command for information is:

sudo docker run -v '/home/user/Documents/projectX:/data' pdal/pdal:1.7 pdal info /data/pt.las -p 0

But If try analogy to replace pt.las with laz2pg and info with pipeline I get an error that file is not found.

I am using Ubuntu 18.04 Bionic.

2 Answers 2


So the line which does the job is:

sudo docker run --net=host -v /home/user/Documents/projectX:/data pdal/pdal:1.7 pdal pipeline /data/laz2pg.txt

the -v option maps the directory /data on the container to the directory /home/user/Documents/projectX on your host machine. It's just like having a shared folder with a virtual machine.

That means that when you call

pdal info /data/pt.las

it's expecting to find a pt.las in the /home/user/Documents/projectX directory. As you won't have put in las2pg in that directory, that's why it's not working when you call info or pipeline on it.

Not personally familiar with PDAL so I'm not sure where the info and pipeline tools live, so check the documentation. It's sometimes the case with docker images that you need to set up a path or environment variable.

  • Thank you for the response. It made me realized some things. Anyway, now I get another error. I am not sure is it because of docker or this version pdal. With the same text file, data and database I was earlier managed to import lidar data to postgres and now I get the error: PDAL: could not connect to server: Connection refused Is the server running on host "localhost" ( and accepting TCP/IP connections on port 5432?
    – Neven
    Commented Aug 6, 2018 at 14:50
  • After I solve this error I will accept your answer, because I am not yet sure it is related to this topic.
    – Neven
    Commented Aug 6, 2018 at 14:51
  • see this question on SO - assuming you intend to run postgres on your host rather than in the container.
    – Steven Kay
    Commented Aug 6, 2018 at 15:22
  • 1
    I succeeded! I put in the command that is net=host. I will my line of code write as an answer, and will accept your answer, because, you really helped me. Thank you. :)
    – Neven
    Commented Aug 7, 2018 at 12:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.