Docker container for Mapserver
docker build -t mapserver .
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
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:
Replace generic.map with the name of your mapserver mapfile.
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
mapserv
http://www.mapserver.org/utilities/gdal
raster utilities: http://www.gdal.org/gdal_utilities.htmlogr
vector utilities: http://www.gdal.org/ogr_utilities.html