Code Monkey home page Code Monkey logo

docker-mapserver's Introduction

mapserver

Docker container for Mapserver

build image

docker build -t mapserver .

start container

docker run -d -p 8182:80 -v `pwd`/map:/map mapserver

while the command is
docker run -d -p [exposed port]:[internal port] -v [your-path]:[container-path] mapserver

access container via http

When Docker is forwarded as localhost simply open the following URL:
http://localhost:8182/cgi-bin/mapserv

When if you have docker-machine in place check its IP with to following command and replace the localhost with it.
docker-machine ip

To make sure the url specified above works the web browser should give a response:
No query information to decode. QUERY_STRING is set, but empty.

A quick way to access the contents of your mapfile in a browser can be achived by:
http://localhost:8182/cgi-bin/mapserv?map=/map/generic.map&mode=browse&template=openlayers&layers=all

The displayed map should look like that:
Generic-Map Browse-Mode Screenshot

Replace generic.map with the name of your mapserver mapfile.

enter container via bash

To enter the container with a bash interface simple switch from daemon mode to interactive mode
docker run -it -v `pwd`/map:/map mapserver bash

There you'll see the mapped /map folder and can use the useful cli tool like

docker-mapserver's People

Contributors

nyakudyaa avatar timlinux avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.