Giter Club home page Giter Club logo

docker-mapserver's Introduction

Docker image for MapServer

The main Mapfile should be in /etc/mapserver/.

You can use the image as is and mount a volume in /etc/mapserver/ to customize it.

Only tags for minor releases exist, not tag for bug fixes.

If the container is run as root, apache listens on port 80. If it is run as another user, it listens on port 8080.

Tunings

You can use the following environment variables (when starting the container) to tune it:

  • MS_DEBUGLEVEL: The debug level 0=off 5=verbose
  • MS_ERRORFILE: If you want the debug to something other than STDOUT
  • MAX_REQUESTS_PER_PROCESS: To work around memory leaks (defaults to 1000)
  • MIN_PROCESSES: The minimum number of fcgi processes to keep (defaults to 1)
  • MAX_PROCESSES: The maximum number of fcgi processes to keep (defaults to 5)
  • MAPSERVER_CATCH_SEGV: Set to 1 to have the stacktraces in case of crash
  • MAPSERVER_BASE_PATH: To setup which is the base path of mapserver (defaults to /)
  • BUSY_TIMEOUT: The maximum time limit for request handling (defaults to 300)
  • IDLE_TIMEOUT: Application processes which have not handled a request for this period of time will be terminated (defaults to 300)
  • IO_TIMEOUT: The maximum period of time the module will wait while trying to read from or write to a FastCGI application (defaults to 40)
  • APACHE_LIMIT_REQUEST_LINE: The maximum size of the HTTP request line in bytes (defaults to 8190)

Running multiple Mapfiles

This section is for if you would like to use more than one Mapfile, or use a Mapfile that isn't /etc/mapserver/mapserver.map.

In this example we have two Mapfiles we want to use that both reference data in different directories. My Mapfiles are wms.map and wfs.map and are located in /mapfiles/ on the host, and the data for these Mapfiles is located in the host in the directory /mapdata/wms and /mapdata/wfs.

docker run -d \
  --restart=unless-stopped \
  --volume=/mapfiles/wms.map/:/etc/mapserver/wms.map:ro \
  --volume=/mapfiles/wfs.map/:/etc/mapserver/wfs.map:ro \
  --volume=/mapdata/wms/:/mapdata/wms/:ro \
  --volume=/mapdata/wfs/:/mapdata/wfs/:ro \
  camptocamp/mapserver

For accessing maps for the WFS service add map=/etc/mapserver/wfs.map to your query string. Here is the URL for a GetCapabilities request:

http://your.mapserver.host/?map=/etc/mapserver/wfs.map&service=WFS&request=GetCapabilities

Similarly, for accessing maps for the WMS service add map=/etc/mapserver/wms.map to your query string.

OGC API

This image can be used to serve OGC API Features and OGC API Tiles.

Some details about the configuration.

You should define the OGCAPI_HTML_TEMPLATE_DIRECTORY generally to /usr/local/share/mapserver/ogcapi/templates/html-bootstrap4/.

If you want to serve MapServer on a subpath, you can use the MAPSERVER_BASE_PATH with the subpath.

If you want to serve multiple MapFiles you should have a Config file with the MAPS directive.

In the Mapfile metadata you should have the following metadata (MAP.WEB.METADATA):

  • "ows_enable_request" or "oga_enable_request" set to "*".
  • "oga_onlineresource" set to the URL (or path) of the OGC API.

The landing page is served by on http://<host>:<port>/<base_path>/<map_name>/ogcapi.

Changelog

8.0

  • confd and entrypoints.d are removed, you should replace it by a volume_from a configuration image or an init container.
  • The MS_MAPFILE has no more default value, was /etc/mapserver/mapserver.map.

Contributing

Install the pre-commit hooks:

pip install pre-commit
pre-commit install --allow-missing-config

docker-mapserver's People

Contributors

danduk82 avatar dependabot[bot] avatar fargusplumdoodle avatar fredj avatar geographika avatar ivorbosloper avatar maltaesousa avatar mcanevet avatar msutter avatar ochriste avatar pre-commit-ci[bot] avatar pvalsecc avatar renovate-bot avatar renovate[bot] avatar rouault avatar sbrunner avatar toilal avatar yjacolin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-mapserver's Issues

Regression: mapserver:8.0 docker image does not render Capabilites with additional path anymore

When using camptocamp/mapserver:8.0 behind a proxy, the templated URL is no more valid.
Before for a GetCapabilties on https://some-server.com/custom/ the templated capabitlites URLs would have been generated as such

<Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://some-server.com/custom/?"/></Get>

but since a few weeks this is broken and it returns

<Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://some-server.com/?"/></Get>

without the /custom/ part of the URL

this is broken now for a few clients.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • Update CI dependencies to v1.6.18 (7.6-gdal3.8) (patch) (c2cciutils, camptocamp/c2cciutils)
  • Update ghcr.io/osgeo/gdal Docker tag to ubuntu-small-3.8.5 (7.6-gdal3.8)
  • Update dependency requests to v2.32.2 (8.0-gdal3.6)
  • Update dependency requests to v2.32.2 (8.0-gdal3.7)
  • Update CI dependencies to v1.6.18 (8.0-gdal3.8) (patch) (c2cciutils, camptocamp/c2cciutils)
  • Update all patch versions (8.0-gdal3.8) (patch) (OWSLib, c2cwsgiutils, ghcr.io/osgeo/gdal, lxml, requests)
  • Update CI dependencies (master) (patch) (pre-commit, python-jsonschema/check-jsonschema)
  • Update all patch versions (master) (patch) (lxml, pytest)
  • Update dependency poetry to v1.8.3 (master)
  • Update CI dependencies (master) (minor) (codespell-project/codespell, poetry)
  • Update all minor versions (master) (minor) (OWSLib, ghcr.io/osgeo/gdal, requests)
  • Lock file maintenance (master)

Detected dependencies

Branch 7.6-gdal3.3
docker-compose
acceptance_tests/docker-compose.yaml
  • camptocamp/postgres 14-postgis-3
  • camptocamp/c2cwsgiutils 3.10.0
dockerfile
Dockerfile
acceptance_tests/Dockerfile
github-actions
.github/workflows/backport.yaml
  • ubuntu 22.04
.github/workflows/changelog.yaml
  • actions/checkout v4
  • actions/cache v3
  • ubuntu 22.04
.github/workflows/clean.yaml
  • actions/checkout v4
  • camptocamp/initialise-gopass-summon-action v2
  • ubuntu 22.04
.github/workflows/main.yaml
  • actions/checkout v4
  • camptocamp/initialise-gopass-summon-action v2
  • ubuntu 22.04
.github/workflows/pr-checks.yaml
  • actions/checkout v4
  • ubuntu 22.04
.github/workflows/pull-request-automation.yaml
  • actions/github-script v7
  • actions/github-script v7
  • actions/github-script v7
  • actions/github-script v7
  • actions/github-script v7
  • ubuntu 22.04
pip_requirements
ci/requirements.txt
  • c2cciutils ==1.6.18
  • oauthlib >=3.2.1
  • setuptools >=65.5.1
  • certifi >=2022.12.7
  • cryptography >=41.0.3
  • requests >=2.31.0
  • pygments >=2.15.0
  • urllib3 >=1.26.17
  • idna >=3.7
pre-commit
.pre-commit-config.yaml
  • pre-commit/mirrors-prettier v3.0.3
regex
ci/config.yaml
  • camptocamp/c2cciutils 1.6.18
Branch 7.6-gdal3.7
docker-compose
acceptance_tests/docker-compose.yaml
  • camptocamp/postgres 14-postgis-3
  • camptocamp/c2cwsgiutils 3.10.0
dockerfile
Dockerfile
  • ghcr.io/osgeo/gdal ubuntu-small-3.7.3
acceptance_tests/Dockerfile
github-actions
.github/workflows/backport.yaml
  • ubuntu 22.04
.github/workflows/changelog.yaml
  • actions/checkout v4
  • actions/cache v3
  • ubuntu 22.04
.github/workflows/clean.yaml
  • actions/checkout v4
  • camptocamp/initialise-gopass-summon-action v2
  • ubuntu 22.04
.github/workflows/main.yaml
  • actions/checkout v4
  • camptocamp/initialise-gopass-summon-action v2
  • ubuntu 22.04
.github/workflows/pr-checks.yaml
  • actions/checkout v4
  • ubuntu 22.04
.github/workflows/pull-request-automation.yaml
  • actions/github-script v7
  • actions/github-script v7
  • actions/github-script v7
  • actions/github-script v7
  • actions/github-script v7
  • ubuntu 22.04
pip_requirements
ci/requirements.txt
  • c2cciutils ==1.6.18
  • oauthlib >=3.2.1
  • setuptools >=65.5.1
  • certifi >=2022.12.7
  • cryptography >=41.0.3
  • requests >=2.31.0
  • pygments >=2.15.0
  • urllib3 >=1.26.17
  • idna >=3.7
pre-commit
.pre-commit-config.yaml
  • pre-commit/mirrors-prettier v3.0.3
regex
ci/config.yaml
  • camptocamp/c2cciutils 1.6.18
Branch 7.6-gdal3.8
docker-compose
acceptance_tests/docker-compose.yaml
  • camptocamp/postgres 14-postgis-3
  • camptocamp/c2cwsgiutils 3.10.0
dockerfile
Dockerfile
  • ghcr.io/osgeo/gdal ubuntu-small-3.8.0
acceptance_tests/Dockerfile
github-actions
.github/workflows/backport.yaml
  • ubuntu 22.04
.github/workflows/changelog.yaml
  • actions/checkout v4
  • actions/cache v3
  • ubuntu 22.04
.github/workflows/clean.yaml
  • actions/checkout v4
  • camptocamp/initialise-gopass-summon-action v2
  • ubuntu 22.04
.github/workflows/main.yaml
  • actions/checkout v4
  • camptocamp/initialise-gopass-summon-action v2
  • ubuntu 22.04
.github/workflows/pr-checks.yaml
  • actions/checkout v4
  • ubuntu 22.04
.github/workflows/pull-request-automation.yaml
  • actions/github-script v7
  • actions/github-script v7
  • actions/github-script v7
  • actions/github-script v7
  • actions/github-script v7
  • ubuntu 22.04
pip_requirements
ci/requirements.txt
  • c2cciutils ==1.6.16
  • oauthlib >=3.2.1
  • setuptools >=65.5.1
  • certifi >=2022.12.7
  • cryptography >=42.0.2
  • requests >=2.31.0
  • pygments >=2.15.0
  • urllib3 >=1.26.17
  • idna >=3.7
pre-commit
.pre-commit-config.yaml
  • pre-commit/mirrors-prettier v3.0.3
regex
ci/config.yaml
  • camptocamp/c2cciutils 1.6.11
Branch 7.6-ubuntu18.04
docker-compose
acceptance_tests/docker-compose.yaml
  • camptocamp/postgres 14-postgis-3
dockerfile
Dockerfile
  • ubuntu 18.04
  • ubuntu 18.04
acceptance_tests/Dockerfile
github-actions
.github/workflows/backport.yaml
  • ubuntu 22.04
.github/workflows/changelog.yaml
  • actions/checkout v4
  • actions/cache v3
  • ubuntu 22.04
.github/workflows/clean.yaml
  • actions/checkout v4
  • camptocamp/initialise-gopass-summon-action v2
  • ubuntu 22.04
.github/workflows/dependency-auto-review.yaml
  • actions/github-script v6
  • ubuntu 22.04
.github/workflows/main.yaml
  • actions/checkout v4
  • camptocamp/initialise-gopass-summon-action v2
  • ubuntu 22.04
.github/workflows/pr-checks.yaml
  • actions/checkout v4
  • ubuntu 22.04
pip_requirements
ci/requirements.txt
  • c2cciutils ==1.6.18
  • pipenv >=2022.1.8
  • setuptools >=65.5.1
  • oauthlib >=3.2.1
  • certifi >=2022.12.7
  • requests >=2.31.0
  • urllib3 >=1.26.17
  • cryptography >=42.0.2
  • idna >=3.7
pre-commit
.pre-commit-config.yaml
  • pre-commit/mirrors-prettier v3.0.3
regex
ci/config.yaml
  • camptocamp/c2cciutils 1.6.18
Branch 8.0-gdal3.6
docker-compose
acceptance_tests/docker-compose.yaml
  • camptocamp/postgres 14-postgis-3
dockerfile
Dockerfile
acceptance_tests/Dockerfile
  • ubuntu 22.04
github-actions
.github/workflows/backport.yaml
  • ubuntu 22.04
.github/workflows/changelog.yaml
  • actions/checkout v4
  • actions/cache v3
  • ubuntu 22.04
.github/workflows/clean.yaml
  • actions/checkout v3
  • camptocamp/initialise-gopass-summon-action v2
  • ubuntu 22.04
.github/workflows/main.yaml
  • actions/checkout v3
  • camptocamp/initialise-gopass-summon-action v2
  • docker/setup-qemu-action v3
  • ubuntu 22.04
.github/workflows/pr-checks.yaml
  • actions/checkout v3
  • ubuntu 22.04
.github/workflows/pull-request-automation.yaml
  • actions/github-script v7
  • actions/github-script v7
  • actions/github-script v7
  • actions/github-script v7
  • actions/github-script v7
  • ubuntu 22.04
pip_requirements
acceptance_tests/requirements.txt
  • poetry ==1.6.1
  • requests >=2.31.0
  • urllib3 >=1.26.17
  • idna >=3.7
ci/requirements.txt
  • c2cciutils ==1.6.18
  • oauthlib >=3.2.1
  • setuptools >=65.5.1
  • certifi >=2022.12.7
  • cryptography >=39.0.1
  • requests >=2.31.0
  • wheel >=0.38.0
  • urllib3 >=1.26.17
  • idna >=3.7
poetry
acceptance_tests/pyproject.toml
  • pytest 7.1.3
  • c2cwsgiutils 5.1.7
  • boltons 23.1.1
  • netifaces 0.11.0
  • requests 2.32.0
  • lxml 4.9.4
  • certifi 2023.7.22
  • OWSLib 0.29.3
  • urllib3 2.0.7
  • idna 3.7
pre-commit
.pre-commit-config.yaml
  • pre-commit/mirrors-prettier v3.0.3
regex
.pre-commit-config.yaml
  • prettier 3.0.3
ci/config.yaml
  • camptocamp/c2cciutils 1.6.18
Branch 8.0-gdal3.7
docker-compose
acceptance_tests/docker-compose.yaml
  • camptocamp/postgres 14-postgis-3
dockerfile
Dockerfile
  • ghcr.io/osgeo/gdal ubuntu-small-3.7.3
acceptance_tests/Dockerfile
  • ubuntu 22.04
github-actions
.github/workflows/backport.yaml
  • ubuntu 22.04
.github/workflows/changelog.yaml
  • actions/checkout v4
  • actions/cache v3
  • ubuntu 22.04
.github/workflows/clean.yaml
  • actions/checkout v4
  • camptocamp/initialise-gopass-summon-action v2
  • ubuntu 22.04
.github/workflows/main.yaml
  • actions/checkout v4
  • camptocamp/initialise-gopass-summon-action v2
  • docker/setup-qemu-action v3
  • ubuntu 22.04
.github/workflows/pr-checks.yaml
  • actions/checkout v4
  • ubuntu 22.04
.github/workflows/pull-request-automation.yaml
  • actions/github-script v7
  • actions/github-script v7
  • actions/github-script v7
  • actions/github-script v7
  • actions/github-script v7
  • ubuntu 22.04
pip_requirements
acceptance_tests/requirements.txt
  • poetry ==1.6.1
  • requests >=2.31.0
  • urllib3 >=1.26.17
  • idna >=3.7
ci/requirements.txt
  • c2cciutils ==1.6.18
  • oauthlib >=3.2.1
  • setuptools >=65.5.1
  • certifi >=2022.12.7
  • cryptography >=39.0.1
  • requests >=2.31.0
  • wheel >=0.38.0
  • urllib3 >=1.26.17
  • idna >=3.7
poetry
acceptance_tests/pyproject.toml
  • pytest 7.1.3
  • c2cwsgiutils 6.0.8
  • boltons 23.1.1
  • netifaces 0.11.0
  • requests 2.32.0
  • lxml 4.9.4
  • certifi 2023.7.22
  • OWSLib 0.29.3
  • urllib3 2.0.7
  • pillow 10.3.0
  • idna 3.7
pre-commit
.pre-commit-config.yaml
  • pre-commit/mirrors-prettier v3.0.3
regex
.pre-commit-config.yaml
  • prettier 3.0.3
ci/config.yaml
  • camptocamp/c2cciutils 1.6.18
Branch 8.0-gdal3.8
docker-compose
acceptance_tests/docker-compose.yaml
  • camptocamp/postgres 14-postgis-3
dockerfile
Dockerfile
  • ghcr.io/osgeo/gdal ubuntu-small-3.8.0
acceptance_tests/Dockerfile
  • ubuntu 22.04
github-actions
.github/workflows/backport.yaml
  • ubuntu 22.04
.github/workflows/changelog.yaml
  • actions/checkout v4
  • actions/cache v3
  • ubuntu 22.04
.github/workflows/clean.yaml
  • actions/checkout v4
  • camptocamp/initialise-gopass-summon-action v2
  • ubuntu 22.04
.github/workflows/main.yaml
  • actions/checkout v4
  • camptocamp/initialise-gopass-summon-action v2
  • docker/setup-qemu-action v3
  • ubuntu 22.04
.github/workflows/pr-checks.yaml
  • actions/checkout v4
  • ubuntu 22.04
.github/workflows/pull-request-automation.yaml
  • actions/github-script v7
  • actions/github-script v7
  • actions/github-script v7
  • actions/github-script v7
  • actions/github-script v7
  • ubuntu 22.04
pip_requirements
acceptance_tests/requirements.txt
  • poetry ==1.6.1
  • requests >=2.31.0
  • urllib3 >=1.26.17
  • idna >=3.7
ci/requirements.txt
  • c2cciutils ==1.6.16
  • oauthlib >=3.2.1
  • setuptools >=65.5.1
  • certifi >=2022.12.7
  • cryptography >=42.0.2
  • requests >=2.31.0
  • wheel >=0.38.0
  • urllib3 >=1.26.17
  • idna >=3.7
poetry
acceptance_tests/pyproject.toml
  • pytest 7.1.3
  • c2cwsgiutils 6.0.4
  • boltons 23.1.1
  • netifaces 0.11.0
  • requests 2.32.0
  • lxml 4.9.3
  • certifi 2023.7.22
  • OWSLib 0.29.2
  • urllib3 2.0.7
  • pillow 10.3.0
  • idna 3.7
pre-commit
.pre-commit-config.yaml
  • pre-commit/mirrors-prettier v3.0.3
regex
.pre-commit-config.yaml
  • prettier 3.0.3
ci/config.yaml
  • camptocamp/c2cciutils 1.6.11
Branch master
docker-compose
acceptance_tests/docker-compose.yaml
  • camptocamp/postgres 14-postgis-3
dockerfile
Dockerfile
  • ghcr.io/osgeo/gdal ubuntu-small-3.8.5
acceptance_tests/Dockerfile
  • ubuntu 24.04
github-actions
.github/workflows/audit.yaml
  • actions/checkout v4
  • camptocamp/initialise-gopass-summon-action v2
  • andstor/file-existence-action v3
  • ubuntu 22.04
.github/workflows/backport.yaml
  • ubuntu 22.04
.github/workflows/clean.yaml
  • actions/checkout v4
  • camptocamp/initialise-gopass-summon-action v2
  • ubuntu 22.04
.github/workflows/delete-old-workflows-run.yaml
  • MajorScruffy/delete-old-workflow-runs v0.3.0
  • ubuntu 22.04
.github/workflows/main.yaml
  • actions/checkout v4
  • camptocamp/initialise-gopass-summon-action v2
  • actions/cache v4
  • actions/upload-artifact v4
  • docker/setup-qemu-action v3
  • ubuntu 22.04
.github/workflows/pr-checks.yaml
  • actions/checkout v4
  • ubuntu 22.04
.github/workflows/pull-request-automation.yaml
  • actions/github-script v7
  • actions/github-script v7
  • actions/github-script v7
  • actions/github-script v7
  • actions/github-script v7
  • ubuntu 22.04
.github/workflows/rebuild.yaml
  • actions/checkout v4
  • camptocamp/initialise-gopass-summon-action v2
  • docker/setup-qemu-action v3
  • ubuntu 22.04
pip_requirements
acceptance_tests/requirements.txt
  • poetry ==1.8.2
  • pip ==24.0
ci/requirements.txt
  • c2cciutils ==1.6.18
  • pre-commit ==3.7.0
poetry
acceptance_tests/pyproject.toml
  • pytest 8.2.0
  • c2cwsgiutils 6.0.8
  • boltons 24.0.0
  • netifaces 0.11.0
  • requests 2.31.0
  • lxml 5.2.1
  • certifi 2024.2.2
  • OWSLib 0.30.0
pre-commit
.pre-commit-config.yaml
  • pre-commit/mirrors-prettier v3.1.0
  • pre-commit/pre-commit-hooks v4.6.0
  • sbrunner/hooks 1.0.0
  • codespell-project/codespell v2.2.6
  • shellcheck-py/shellcheck-py v0.10.0.1
  • jumanjihouse/pre-commit-hooks 3.0.0
  • python-jsonschema/check-jsonschema 0.28.2
  • sirwart/ripsecrets v0.1.8
  • PyCQA/autoflake v2.3.1
  • asottile/pyupgrade v3.15.2
  • PyCQA/isort 5.13.2
  • psf/black 24.4.2
  • sbrunner/jsonschema-validator 0.1.0
regex
.pre-commit-config.yaml
  • poetry 1.8.2
  • poetry 1.8.2
  • pyjson5 1.6.6
ci/config.yaml
  • camptocamp/c2cciutils 1.6.18

  • Check this box to trigger a request for Renovate to run again on this repository

poetry-1.2.2-py3-none-any.whl: 1 vulnerabilities (highest severity is: 6.8)

Vulnerable Library - poetry-1.2.2-py3-none-any.whl

Path to dependency file: /acceptance_tests/requirements.txt

Path to vulnerable library: /acceptance_tests/requirements.txt

Vulnerabilities

CVE Severity CVSS Dependency Type Fixed in (poetry version) Remediation Available
CVE-2022-23491 Medium 6.8 certifi-2022.9.24-py3-none-any.whl Transitive N/A*

*For some transitive vulnerabilities, there is no version of direct dependency with a fix. Check the section "Details" below to see if there is a version of transitive dependency where vulnerability is fixed.

Details

CVE-2022-23491

Vulnerable Library - certifi-2022.9.24-py3-none-any.whl

Python package for providing Mozilla's CA Bundle.

Library home page: https://files.pythonhosted.org/packages/1d/38/fa96a426e0c0e68aabc68e896584b83ad1eec779265a028e156ce509630e/certifi-2022.9.24-py3-none-any.whl

Path to dependency file: /acceptance_tests/requirements.txt

Path to vulnerable library: /acceptance_tests/requirements.txt

Dependency Hierarchy:

  • poetry-1.2.2-py3-none-any.whl (Root Library)
    • requests-2.28.1-py3-none-any.whl
      • certifi-2022.9.24-py3-none-any.whl (Vulnerable Library)

Found in base branch: master

Vulnerability Details

Certifi is a curated collection of Root Certificates for validating the trustworthiness of SSL certificates while verifying the identity of TLS hosts. Certifi 2022.12.07 removes root certificates from "TrustCor" from the root store. These are in the process of being removed from Mozilla's trust store. TrustCor's root certificates are being removed pursuant to an investigation prompted by media reporting that TrustCor's ownership also operated a business that produced spyware. Conclusions of Mozilla's investigation can be found in the linked google group discussion.

Publish Date: 2022-12-07

URL: CVE-2022-23491

CVSS 3 Score Details (6.8)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: High
    • User Interaction: None
    • Scope: Changed
  • Impact Metrics:
    • Confidentiality Impact: None
    • Integrity Impact: High
    • Availability Impact: None

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: https://www.cve.org/CVERecord?id=CVE-2022-23491

Release Date: 2022-12-07

Fix Resolution: certifi - 2022.12.07

Step up your Open Source Security Game with Mend here

build problem

i'm trying to run the build script on ubuntu (via wsl), it fails on

#0 0.531 + cd /src
#0 0.532 + /tmp/checkout_release main
: invalid optionsh: -
Dockerfile:25
ERROR: failed to solve: process "/bin/bash -o pipefail -cux cd /src     && /tmp/checkout_release ${MAPSERVER_BRANCH}" did not complete successfully: exit code: 1
make: *** [Makefile:23: build] Error 1

any guidance on what may be causing this?

MS_MAP_PATTERN regex wont match files with hyphens

When I try to pass mapfile with hyphens I got this validation error:

[warn] [pid 25] mod_fcgid: stderr: msCGILoadMap(): Web application error. CGI variable "map" fails to validate.
2098 - 172.17.0.1 - - [02/Jun/2021:04:57:42 +0000] "GET /?map=/etc/mapserver/puobod/krpk-puobod-red.map&request=getcapabilities&service=WMS HTTP/1.1" 200 620 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729; InfoPath.3)"

It is caused by escaped hyphens in
MS_MAP_PATTERN=^\/etc\/mapserver\/([^\.][_A-Za-z0-9\-\.]+\/{1})*([_A-Za-z0-9\-\.]+\.map)$

It should probably look like this
MS_MAP_PATTERN=^\/etc\/mapserver\/([^\.][-_A-Za-z0-9\.]+\/{1})*([-_A-Za-z0-9\.]+\.map)$

Discussion about this error on MS mailing list:
http://osgeo-org.1560.x6.nabble.com/CGI-variable-quot-map-quot-fails-to-validate-td5487971.html

Postgis Connection lost

Hey,
Our Mapserver seems to lose the connection to the used DB (both are stored in docker containers) after some (varying) time.
I tried to play with the environment variables, as I thought it might have to do with idle connections that get terminated.

      BUSY_TIMEOUT: 10
      IDLE_TIMEOUT: 10
      IO_TIMEOUT: 10

This however didnt lead to closed connections after 10 seconds which I assumed are the unit for this values. Is there like a minimum threshold or can I set all of them to 0 to never terminate the connections automatically?

WMS connection error. MapServer not built with WMS Client support, unable to render layer

I'm using this image since months with the same configuration, but after updating the image to latest version, it seems CONNECTIONTYPE WMS doesn't work anymore.

I saw you migrate to a build from scratch, which is really a good idea for a Docker image, but it seems there are some features missing though.

Here's the error

<?xml version='1.0' encoding="UTF-8" standalone="no" ?>
<!DOCTYPE ServiceExceptionReport SYSTEM "http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd">
<ServiceExceptionReport version="1.1.1">
<ServiceException>
msDrawMap(): WMS connection error. MapServer not built with WMS Client support, unable to render layer &#39;refign&#39;.
</ServiceException>
</ServiceExceptionReport>

Also, I think the default tag on Docker hub should point on a stable release (7) instead of master.

publish mapserver at a path

not sure if this is a mapserver or docker (or misconfiguration) issue, just posting it here to hear your thoughts.

when i deploy mapserver-docker at a path '/ows' using k8s-nginx-ingress, the mapfile key from path is no longer identified. with map config set to:

Maps
  "clay" "/srv/data/clay.map"
END

and ingress config:

      - backend:
          service:
            name: mapserver
            port:
              number: 80
        path: /ows(/|$)(.*)
        pathType: Prefix

/ows/clay?request=getcapabilities&service=wms returns "msCGILoadMap(): Web application error. CGI variable "map" is not set."

/ows/clay?request=getcapabilities&service=wms&map=clay works fine though

Add docker image for Arm64/ArmHF

Currently, only images for AMD64 are available from docker hub. Arm-based servers are gaining popularity and the new Ampere Altra servers are almost cheap compared to Intel servers. Also, big public cloud providers are offereing nowadays quite affordable Arm VPS.
For this reasons, plus the possibility to run a test instance on Raspberry Pi, container images for Arm64/ArmHF would be great.

Publishing docker images for different architectures under the same label

Currenlty the images of camptocamp/mapserver for other os/architectures are pushed with a different tag like 8.0-arm64 to docker hub.

To align the deployment of mapserver container in different environments with different os/architectures it would be very helpful to have images for different architectures under the same tag such as it is done for the multi-platform images of Apache httpd in https://hub.docker.com/_/httpd/tags.

Why is "latest" tag not updated?

Hi CampToCamp maintainers,

Sorry if this is the wrong place to ask this question but I don't know how else.

The "latest" tag on https://hub.docker.com/r/camptocamp/mapserver/tags is 2 years old but there are plenty of newer images there.

The Docker image "latest" works fine for my purposes but I am just puzzled. Are the new images unstable or experiments or what? I just like to stay up to date.

Thanks for providing the image!

Is it possible to rewrite URLs?

Hello,

I would like to use the image with docker-commpose.yml and rewrite the URLs so that I can specify the filename of the map in the path (without path and .map).

default:
http://your.mapserver.host/?map=/etc/mapserver/mapfile.map&service=WMS&request=GetCapabilities

requested:
http://your.mapserver.host/map/mapfile?service=WMS&request=GetCapabilities

The rewrite module is apparently not enabled by default in the image and my attempts to do so have unfortunately failed so far.
Is there an easy way to enable this via config? And if this works, do I additionally need to change something in the MS_MAP_PATTERN environment variable so that I don't get an error due to missing map parameter?

Incomplete WMS request: VERSION parameter missing

I'm not sure if I'm doing something wrong, but I always get the error:

msWMSDispatch(): WMS server error. Incomplete WMS request: VERSION parameter missing

My test URL is:

curl -X GET http://localhost:8888?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=polygons&SRS=EPSG:4326&BBOX=-124,21,-66,49&WIDTH=600&HEIGHT=400&FORMAT=image/png

The only logging I get from mapserver is:

cat /tmp/mapserver_error.log 
[Thu Apr  8 18:40:03 2021].398120 loadParams() QUERY_STRING: SERVICE=WMS

I don't know if the cgi wrapper isn't passing on the rest of the query parameters? Or it can't read the map file?

-rw-r--r--. 1 root root 15277 Apr 8 18:33 mapserver.map

Thanks

Support tile mode

When trying to access a published layer with tile-mode it results in an error msTileSetup(): CGI error. Tile API is not available. If this is the expected behaviour of this docker image, please close this issue.

Example url: http://mapserver:8080/?layer=polygons&mode=tile&tilemode=gmap&tile=0+0+0 .

I traced it down to a missing cmake -DUSE_PROJ=1 option in the Dockerfile builder target. Without this option, after running cmake the mapserver-config.h contains an out-commented /* #undef USE_PROJ */ and the tile-mode feature is not compiled.

extend gdal with plugin for parquet support

parquet seems an interesting format for mapserver, because it loads only a subset of data in memory

for parquet support the libgdal-arrow-parquet should be included

suggestion is to add this lib to the docker build

maybe start with full gdal as suggested in OSGeo/gdal#8453 (comment)

the example.parquet file through mapserver:
image

LAYER
        NAME "example"
        TYPE Polygon
        CONNECTION  "example.parquet"
        DATA example
        CONNECTIONTYPE OGR
        CONNECTIONOPTIONS
            "CRS" "EPSG:4326"
        END

End of script output before headers: mapserv_wrapper

Some outputs from mapserver_wrapper result in Apache 500 HTTP response. For example, querying browse mode without a defined template produce this log message and HTTP 500 response:

[warn] [pid 25] mod_fcgid: stderr: mapserv(): Web application error. Traditional BROWSE mode requires a TEMPLATE in the WEB section, but none was provided. `
[error] [pid 25] End of script output before headers: mapserv_wrapper
[04/Jun/2021:09:17:22 +0000] "GET /?map=/etc/mapserver/honitby/honitby.map HTTP/1.1" 500 806 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36"

But when I try exec into container and execute mapserv_wrapper (or mapserv) directly, like this:

/usr/local/bin/mapserv_wrapper "QUERY_STRING=map=/etc/mapserver/honitby/honitby.map"

it produces correct HTML response:

Content-Type: text/html

<HTML>
<HEAD><TITLE>MapServer Message</TITLE></HEAD>
<!-- MapServer version 7.4.5 OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=SVG_SYMBOLS SUPPORTS=RSVG SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=GEOS SUPPORTS=POINT_Z_M SUPPORTS=PBF INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE -->
<BODY BGCOLOR="#FFFFFF">
mapserv(): Web application error. Traditional BROWSE mode requires a TEMPLATE in the WEB section, but none was provided.
</BODY></HTML>

It works a bit strange by my observations. For example, when I attach to container log (docker logs -f) it starts to produce correct HTML responses instead of 500

I also try to redirect error output to stdout or file, instead of stderr, but with no luck.

Probably the 'end of script output before headers: mapserv_wapper' is the key, but I dong know what can be wrong...

MS_MAP_PATTERN regex cannot be compiled

Hi there,

I am using the docker image camptocamp/mapserver:7.6, and I'm getting an error with MS_MAP_PATTERN.
I landed here, and saw that the were a commit for this error a couple of minutes ago, so I just tried with the very last docker image (https://hub.docker.com/layers/camptocamp/mapserver/7.6/images/sha256-1f079b8eef8049a599b4a152990c0bae802d972e3bf3d6723c1a7c7651d87e7a?context=explore), but I'm still having the regex validation error:

msCGILoadMap(): Web application error. CGI variable "map" fails to validate. msEvalRegex(): Regular expression error. Failed to compile expression (^/etc/mapserver/([^.][_A-Za-z0-9-.]+/{1})*([_A-Za-z0-9-.]+.map)$).

Any Idea ?
Thanks!

AH00480: apr_thread_create: unable to create worker thread using docker image 8.0 only

I have an issue when using camptocamp/docker-mapserver:8.0 on an older docker engine. I don't have this problem when I use camptocamp/docker-mapserver:7.6 image.

It may be related to exceeding resources. Could you help me finding what a could change in apache parameters to solve this issue?

This is the trace log I have after ./start-server initiate apache2.

Trace log

[Wed May 24 20:16:53.708222 2023] [env:warn] [pid 1:tid 139647199184768] AH01506: PassEnv variable _ was undefined
[Wed May 24 20:16:53.711641 2023] [env:warn] [pid 1:tid 139647199184768] AH01506: PassEnv variable _ was undefined
 [notice] [pid 1] AH00489: Apache/2.4.52 (Ubuntu) mod_fcgid/2.3.9 configured -- resuming normal operations
 [notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
 [alert] [pid 14] AH00480: apr_thread_create: unable to create worker thread
 [alert] [pid 15] AH00480: apr_thread_create: unable to create worker thread
 [alert] [pid 1] AH02324: A resource shortage or other unrecoverable failure was encountered before any child process initialized successfully... httpd is exiting!

Need to be able to use the latest version of Apache

According to a recent penetration test, we need to bring the version of Apache included in this map server image up to date. However, the highest version installed using the 8.0 tag is Apache 2.4.52, which is the latest version available to mirrors set up in the osgeo/gdal:ubuntu-small-3.5.1 image. The latest Apache is version 2.4.59 and there have been some updates marked important: https://httpd.apache.org/security/vulnerabilities_24.html

Can we please bring this image up to date? We had issues on our end with the libaio1 which apparently isn't available in Ubuntu 2.4.04 and updating it to libaio1t64 apparently doesn't work either.

Failed to fetch package

Hi,

I'm trying to run your docker image but is complaining about some URL resolve:

Err http://security.debian.org jessie/updates InRelease

Err http://http.debian.net jessie-backports InRelease

Err http://security.debian.org jessie/updates Release.gpg
Could not resolve 'security.debian.org'
Err http://http.debian.net jessie-backports Release.gpg
Could not resolve 'http.debian.net'
Err http://httpredir.debian.org jessie InRelease

Err http://httpredir.debian.org jessie-updates InRelease

Err http://httpredir.debian.org jessie Release.gpg
Could not resolve 'httpredir.debian.org'
Err http://httpredir.debian.org jessie-updates Release.gpg
Could not resolve 'httpredir.debian.org'
Reading package lists...
W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie/InRelease

W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie-updates/InRelease

W: Failed to fetch http://security.debian.org/dists/jessie/updates/InRelease

W: Failed to fetch http://http.debian.net/debian/dists/jessie-backports/InRelease

W: Failed to fetch http://security.debian.org/dists/jessie/updates/Release.gpg Could not resolve 'security.debian.org'

W: Failed to fetch http://http.debian.net/debian/dists/jessie-backports/Release.gpg Could not resolve 'http.debian.net'

W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie/Release.gpg Could not resolve 'httpredir.debian.org'

W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie-updates/Release.gpg Could not resolve 'httpredir.debian.org'

W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package apache2
E: Unable to locate package cgi-mapserver
E: Unable to locate package libapache2-mod-fcgid
E: Unable to locate package curl

Thanks for any tip
Cheer
G.

Can't start container after kill/crash

When the container is killed, it's not possible to start it again because of the apache lock file beeing present. Is it possible to disable this "feature" ?

Step to reproduce:

$ docker run --name mapserver-lock-test -d camptocamp/mapserver
$ docker kill mapserver-lock-test
$ docker start mapserver-lock-test
$ docker logs --tail=1 mapserver-lock-test 

This displays "httpd (pid 1) already running"

$ docker ps

mapserver-lock-test container is not running.

mapserver error logging

can you provide some guidance on how to achieve optimal logging setup for mapserver docker?

Desired behaviour:

  • a single environment variable to set logging to DEBUG or PROD
  • PROD includes any error messages returned by mapserver binary to docker logs (i always mixup STDOUT/STDERR for ms_errorfile)
  • DEBUG setting provides access logs as well as error logs

I assume it's a combination of finetuning ms_errorfile (i'm always confused with STDOUT/STDERR for ms_errorfile) and apache logging options?

OGR WFS connection does not forward BBOX to some servers

Issue

A public WFS that needs to be cascaded as WFS Layer by Mapserver has been defined with an OGR connection (because this does not work with WFS connection). The provided Mapserver in the container does however not forward the spacial BBOX filter to the external WFS and instead calls all features (with max limit) or the entire extent. This leads to unpredictable or no results on calling a BBOX.
The same configuration works on a Mapserver 7.2.4 on a standard installation (see below).
The issue was discussed in the Mapserver mailing list but seems specific to this docker image Mapserver.
Thank's for any help.

How to Reproduce

Use the provided Mapfile and OGR - XML file in attach and call
http://localhost:8181/cgi-bin/mapserv?map=/var/www/html/wfs.map&SRSNAME=EPSG:3857&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&BBOX=791880.72463009,6321925.37255709,792929.63787777,6322786.10157277&TYPENAME=TestLayer
from a browser.

The direct call
http://sg.geodatenzentrum.de/wfs_info?SRSNAME=EPSG:3857&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&BBOX=791880.72463009,6321925.37255709,792929.63787777,6322786.10157277&TYPENAME=info:dop
does work so it is not a matter of no data at that position or a failure of the external server.

These calls do deliver the expected results (having no BBOX):
http://localhost:8181/cgi-bin/mapserv?map=/var/www/html/wfs.map&SRSNAME=EPSG:3857&SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&Maxfeatures=10&TYPENAME=TestLayer

http://localhost:8181/cgi-bin/mapserv?map=/var/www/html/wfs.map&SRSNAME=EPSG:4326&SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&Maxfeatures=10&TYPENAME=TestLayer

Further Information

The external server needs explicit SRS in the OGR-XML file as it does not use the default SRS if no SRS is transmitted. this is taken into account for in the test files.

The setup does work as expected on the following configuration (standard Mapserver on Debian):

MapServer version 7.4.2 OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ SUPPORTS=AGG
SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=SVG_SYMBOLS SUPPORTS=RSVG SUPPORTS=ICONV 
SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER 
SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI 
SUPPORTS=THREADS SUPPORTS=GEOS SUPPORTS=PBF INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL 
INPUT=SHAPEFILE

on

Distributor ID:	Debian
Description:	Debian GNU/Linux bullseye/sid
Release:	testing
Codename:	bullseye

Working setup to reproduce the issue:
issue_mapserver_files.zip

Debug Output:

WFS: GetFeature operation supports hits
WFS: No transaction support
GDAL: GDALOpen(/var/www/html/wfs-request-dop-bkg-age.xml, this=0x13949a0) succeeds as WFS.
HTTP: Fetch(http://sg.geodatenzentrum.de/wfs_info?SERVICE=WFS&VERSION=1.1.0&SRSNAME=EPSG:25832&REQUEST=DescribeFeatureType&TYPENAME=info:dop,info:dtk25%2Dv,info:dtk50,info:dtk100%2Dv_upd,info:basis%2Ddlm_upd,info:dgm1000,info:dgm200,info:dgm100_upd,info:dgm100,info:dgm50_upd,info:dgm50,info:dgm25_upd,info:dgm25,info:dgm10_upd,info:dgm10,info:dgm5_upd,info:dtk25_upd,info:dtk250,info:dtk100%2Dv,info:basis%2Ddlm,info:dtk1000,info:dtk25,info:dtk50%2Dv,info:dtk100,info:dtk100_upd,info:dtk50%2Dv_upd,info:dtk200,info:dop_upd,info:dtk25%2Dv_upd,info:dtk500,info:dtk50_upd,info:dgm5)
WFS: Turn off loading of multiple layer definitions at a single time
WFS: http://sg.geodatenzentrum.de/wfs_info?SERVICE=WFS&VERSION=1.1.0&SRSNAME=EPSG:25832&REQUEST=DescribeFeatureType&TYPENAME=info:dop
HTTP: Fetch(http://sg.geodatenzentrum.de/wfs_info?SERVICE=WFS&VERSION=1.1.0&SRSNAME=EPSG:25832&REQUEST=DescribeFeatureType&TYPENAME=info:dop)
WFS: http://sg.geodatenzentrum.de/wfs_info?SERVICE=WFS&VERSION=1.1.0&MAXFEATURES=1&SRSNAME=EPSG:25832&REQUEST=GetFeature&TYPENAME=info:dop
HTTP: Fetch(http://sg.geodatenzentrum.de/wfs_info?SERVICE=WFS&VERSION=1.1.0&MAXFEATURES=1&SRSNAME=EPSG:25832&REQUEST=GetFeature&TYPENAME=info:dop)
GML: Using Expat reader
GDAL: GDALOpen(/vsimem/tempwfs_0x14b43c0/file.gml, this=0x149c640) succeeds as GML.
GDAL: GDALClose(/vsimem/tempwfs_0x14b43c0/file.gml, this=0x149c640)
GDAL: GDALClose(/var/www/html/wfs-request-dop-bkg-age.xml, this=0x13949a0)
WFS: GetFeature operation supports hits
WFS: No transaction support
GDAL: GDALOpen(/var/www/html/wfs-request-dop-bkg-age.xml, this=0x13949a0) succeeds as WFS.
GDAL: GDALClose(/var/www/html/wfs-request-dop-bkg-age.xml, this=0x13949a0)
WFS: GetFeature operation supports hits
WFS: No transaction support
GDAL: GDALOpen(/var/www/html/wfs-request-dop-bkg-age.xml, this=0x13949a0) succeeds as WFS.
HTTP: Fetch(http://sg.geodatenzentrum.de/wfs_info?SERVICE=WFS&VERSION=1.1.0&SRSNAME=EPSG:25832&REQUEST=DescribeFeatureType&TYPENAME=info:dop,info:dtk25%2Dv,info:dtk50,info:dtk100%2Dv_upd,info:basis%2Ddlm_upd,info:dgm1000,info:dgm200,info:dgm100_upd,info:dgm100,info:dgm50_upd,info:dgm50,info:dgm25_upd,info:dgm25,info:dgm10_upd,info:dgm10,info:dgm5_upd,info:dtk25_upd,info:dtk250,info:dtk100%2Dv,info:basis%2Ddlm,info:dtk1000,info:dtk25,info:dtk50%2Dv,info:dtk100,info:dtk100_upd,info:dtk50%2Dv_upd,info:dtk200,info:dop_upd,info:dtk25%2Dv_upd,info:dtk500,info:dtk50_upd,info:dgm5)
WFS: Turn off loading of multiple layer definitions at a single time
WFS: http://sg.geodatenzentrum.de/wfs_info?SERVICE=WFS&VERSION=1.1.0&SRSNAME=EPSG:25832&REQUEST=DescribeFeatureType&TYPENAME=info:dop
HTTP: Fetch(http://sg.geodatenzentrum.de/wfs_info?SERVICE=WFS&VERSION=1.1.0&SRSNAME=EPSG:25832&REQUEST=DescribeFeatureType&TYPENAME=info:dop)
WFS: http://sg.geodatenzentrum.de/wfs_info?SERVICE=WFS&VERSION=1.1.0&MAXFEATURES=1&SRSNAME=EPSG:25832&REQUEST=GetFeature&TYPENAME=info:dop
HTTP: Fetch(http://sg.geodatenzentrum.de/wfs_info?SERVICE=WFS&VERSION=1.1.0&MAXFEATURES=1&SRSNAME=EPSG:25832&REQUEST=GetFeature&TYPENAME=info:dop)
GML: Using Expat reader
GDAL: GDALOpen(/vsimem/tempwfs_0x14c06b0/file.gml, this=0x149c640) succeeds as GML.
GDAL: GDALClose(/vsimem/tempwfs_0x14c06b0/file.gml, this=0x149c640)
WFS: http://sg.geodatenzentrum.de/wfs_info?SERVICE=WFS&VERSION=1.1.0&MAXFEATURES=500&SRSNAME=EPSG:25832&REQUEST=GetFeature&TYPENAME=info:dop
HTTP: Fetch(http://sg.geodatenzentrum.de/wfs_info?SERVICE=WFS&VERSION=1.1.0&MAXFEATURES=500&SRSNAME=EPSG:25832&REQUEST=GetFeature&TYPENAME=info:dop)
GML: Using Expat reader
GDAL: GDALOpen(/vsimem/tempwfs_0x14c06b0/file.gml, this=0x149c640) succeeds as GML.
GML: ResetReading()
GML: ResetReading()
GML: ResetReading()
GDAL: GDALClose(/vsimem/tempwfs_0x14c06b0/file.gml, this=0x149c640)
GDAL: GDALClose(/var/www/html/wfs-request-dop-bkg-age.xml, this=0x13949a0)
 [warn] [pid 27] mod_fcgid: stderr: freeLayer(): freeing layer at 0x138e110.
3240054 - 172.17.0.1 - - [31/May/2021:07:25:03 +0000] "GET /cgi-bin/mapserv?map=/var/www/html/wfs.map&SRSNAME=EPSG:3857&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&BBOX=791880.72463009,6321925.37255709,792929.63787777,6322786.10157277&TYPENAME=DOP_AGE_DE HTTP/1.1" 200 1097 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36"
360 - 172.17.0.1 - - [31/May/2021:07:25:07 +0000] "GET /favicon.ico HTTP/1.1" 200 414 "http://localhost:8181/cgi-bin/mapserv?map=/var/www/html/wfs.map&SRSNAME=EPSG:3857&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&BBOX=791880.72463009,6321925.37255709,792929.63787777,6322786.10157277&TYPENAME=DOP_AGE_DE" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36"

OGC API Bootstrap configuration issue?

On my camptocamp docker, I've configured ogcapi. Home is

http://172.29.64.117:591/oga_one/ogcapi

This displays an html page as expected

Information about feature collections available from this server

http://172.29.64.117:591/oga_one/ogcapi/collections?f=html

HTML page is displayed, but links are incorrect

links like:

http://172.29.64.117:591/oga_one/ogcapi/collections/collections/GBR_BGS_625k_BA?

If you correct to http://172.29.64.117:591/oga_one/ogcapi/collections/GBR_BGS_625k_BA?f=html i.e. remove the extra collections/ you get an HTML page but in that page the links are incorrect, so the Items for this collection as HTML link becomes http://172.29.64.117:591/oga_one/ogcapi/collections/GBR_BGS_625k_BA/collections/GBR_BGS_625k_BA/items? i.e. repeats collections/GBR_BGS_625k_BA/

It appears that {{ template.api_root }} and {{ response.collection.id }} are not being set correctly somehow.

As way of expected behaviour I have a gisinternals MapServer 8.0.1 service with OGC API configured for the same data.:

Home

https://ogc.bgs.ac.uk/cgi-bin/BGS_Bedrock_and_Surface_Geology/ows/bbsp/ogcapi

Information about feature collections available from this server

https://ogc.bgs.ac.uk/cgi-bin/BGS_Bedrock_and_Superficial_Geology/ows/bbsp/ogcapi/collections?f=html

GBR BGS 1:625k Bedrock Age (feature collection)

https://ogc.bgs.ac.uk/cgi-bin/BGS_Bedrock_and_Superficial_Geology/ows/bbsp/ogcapi/collections/GBR_BGS_625k_BA?f=html

Items for this collection as HTML

https://ogc.bgs.ac.uk/cgi-bin/BGS_Bedrock_and_Superficial_Geology/ows/bbsp/ogcapi/collections/GBR_BGS_625k_BA/items?f=html

Am I misconfigured somehow, or is this an issue with the image

The escaping in Dockerfile on MS_MAP_PATTERN did not work for me

The escaping defined in Dockerfile did not seem necessary and it was never finding my map file.
I changed it to this and it worked.
#MS_MAP_PATTERN=^\/etc\/mapserver\/([^\\.][-_A-Za-z0-9\.]+\/{1})([-_A-Za-z0-9\.]+\.map)$
MS_MAP_PATTERN=^/etc/mapserver/([^\.][-_A-Za-z0-9.]+/{1})
([-_A-Za-z0-9.]+.map)$

CGI variable "map" fails to validate.

I'm trying to get the mapserver up and running but get the following error:

msCGILoadMap(): Web application error. CGI variable "map" fails to validate.

Here is my compose file:

version: '3'
services:
  mapserver:
    image: camptocamp/mapserver
    ports:
      - 8081:80
    volumes:
      - $PWD/mapserver/:/etc/mapserver/
    restart: unless-stopped

The local mapserver dir contains the following:

mapserver
├── data
│   └── states_ugl.shp
└── mapserver.map

I changed the SHAPEPATH to use the data-directory:

SHAPEPATH      "data"
mapserver.map
# The annotated map file (sort of)
# Created by Pericles S. Nacionales for the MapServer tutorial
# 2005-04-08
# Maintained & enhanced since by Jeff McKenna, GatewayGeo
# 2023-04-19 Last updated
#
# MapServer map file uses the pound sign (#) to denote the start of a line
# comment--each line that needs to be commented has to be prepended with a "#".
#
# Map files begin with MAP keyword to signify the start of the map object.
# Well, the entire map file is THE map object.  Enclosed between MAP and END
# at the very bottom of this map file, are keyword/value pairs and other
# objects.
MAP
  IMAGETYPE      PNG
  EXTENT         -97.238976 41.619778 -82.122902 49.385620
  SIZE           400 300
  SHAPEPATH      "data"
  IMAGECOLOR     255 255 255

  # Layer objects are defined beneath the map object.  You need at least one
  # layer defined in your map file before you can display a map...  You can
  # define as many layers as you'd like.

  # Start of LAYER DEFINITIONS ---------------------------------------------
  LAYER # States polygon layer begins here
    NAME         "states"
    DATA         "states_ugl.shp"
    STATUS       OFF
    TYPE         POLYGON

    # The class object is defined within the layer object.  You can define as
    # many classes as you need (well, there are limits as with layers, but it's
    # senseless to define more than ten on a "normal" layer.  There are
    # situations, however, where you might have to do it.)
    CLASS
      NAME       "The Upper Great Lakes States"

      # There are styles in a class, just like there are classes in a layer,
      # just like there are layers in a map.  You can define multiple styles in
      # a class just as you can define multiple classes in a layer and multiple
      # layers in a map.
      STYLE
        COLOR        232 232 232
        OUTLINECOLOR 32 32 32
      END
    END
  END # States polygon layer ends here
  # End of LAYER DEFINITIONS -------------------------------

END # All map files must come to an end just as all other things must come to..

The query used is:

http://localhost:8081/cgi-bin/mapserv?map=/etc/mapserver/mapserver.map

What could be the problem?

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.