openmaptiles-How to write in docker-compose

620 Views Asked by At

I am using openmaptiles server and the command

docker run --rm -it -v $(pwd):/data -p 8080:80 klokantech/openmaptiles-server Runs fine.How do i write the same in docker-compose file. I am unable to mount the volumes with

volumes:
  - $(pwd) : /data

and even I tried

volumes:
  - ./:/data

But i get error the /data folder is not mapped.

Any help would be much appreciated.

error: No directory is mapped to the /data volume. Any data you download and the created configuration will be lost once you stop the docker container.

1

There are 1 best solutions below

0
On

well I just removed everything using

docker system prune -a and ran again with this configuration and it works!

  maptiles:
    image: klokantech/openmaptiles-server
    volumes:
      - .:/data
    ports:
      - 8080:80