docker.rst 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. .. _installation_docker:
  2. Docker Container
  3. ================
  4. Geoserver is also packaged as a Docker Container. For more details, see the `Geoserver Docker Container Project <https://github.com/geoserver/docker>`__.
  5. See the `README.md <https://github.com/geoserver/docker/blob/master/README.md>`__ file for more technical information.
  6. Quick Start
  7. -----------
  8. This will run the container, with the data directory included with the container:
  9. #. Make sure you have `Docker <https://www.docker.com/>`__ installed.
  10. #. Download the container:
  11. .. only:: not snapshot
  12. These instructions are for GeoServer |release|.
  13. .. parsed-literal::
  14. docker pull docker.osgeo.org/geoserver:|release|
  15. .. only:: snapshot
  16. These instructions are for GeoServer |version|-SNAPSHOT which is provided as a :website:`Nightly <release/main>` release.
  17. Testing a Nightly release is a great way to try out new features, and test community modules.
  18. Nightly releases change on an ongoing basis and are not suitable for a production environment.
  19. .. parsed-literal::
  20. docker pull docker.osgeo.org/geoserver:|version|.x
  21. #. Run the container
  22. .. only:: not snapshot
  23. .. parsed-literal::
  24. docker run -it -p8080:8080 docker.osgeo.org/geoserver:|release|
  25. .. only:: snapshot
  26. .. parsed-literal::
  27. docker run -it -p8080:8080 docker.osgeo.org/geoserver:|version|.x
  28. #. In a web browser, navigate to ``http://localhost:8080/geoserver``.
  29. If you see the GeoServer Welcome page, then GeoServer is successfully installed.
  30. .. figure:: images/success.png
  31. GeoServer Welcome Page
  32. #. This setup is a quick test to ensure the software is working, but is difficult to use as file data can only be transferred to the data directory included with the container via the REST API.
  33. Using your own Data Directory
  34. -----------------------------
  35. This will run the container with a local data directory. The data directory will be `mounted <https://docs.docker.com/storage/bind-mounts/>`__ into the docker container.
  36. .. note::
  37. Change `/MY/DATADIRECTORY` to your data directory. If this directory is empty it will be populated with the standard Geoserver Sample Data Directory.
  38. #. Make sure you have `Docker <https://www.docker.com/>`__ installed.
  39. #. Download the container
  40. .. only:: not snapshot
  41. .. parsed-literal::
  42. docker pull docker.osgeo.org/geoserver:|release|
  43. .. only:: snapshot
  44. .. parsed-literal::
  45. docker pull docker.osgeo.org/geoserver:|version|.x
  46. #. Run the container
  47. .. only:: not snapshot
  48. .. parsed-literal::
  49. docker run -it -p8080:8080 \\
  50. --mount type=bind,src=/MY/DATADIRECTORY,target=/opt/geoserver_data \\
  51. docker.osgeo.org/geoserver:|release|
  52. .. only:: snapshot
  53. .. parsed-literal::
  54. docker run -it -p8080:8080 \\
  55. --mount type=bind,src=/MY/DATADIRECTORY,target=/opt/geoserver_data \\
  56. docker.osgeo.org/geoserver:|version|.x
  57. #. In a web browser, navigate to ``http://localhost:8080/geoserver``.
  58. If you see the GeoServer Welcome page, then GeoServer is successfully installed.
  59. .. figure:: images/success.png
  60. GeoServer Welcome Page
  61. #. This setup allows direct management of the file data shared with the container. This setup is also easy to update to use the latest container.
  62. Adding GeoServer Extensions
  63. ---------------------------
  64. You can add GeoServer Extensions - the container will download them during startup.
  65. .. only:: not snapshot
  66. .. parsed-literal::
  67. docker run -it -p8080:8080 \\
  68. --env INSTALL_EXTENSIONS=true \\
  69. --env STABLE_EXTENSIONS="ysld,h2" \\
  70. docker.osgeo.org/geoserver:|release|
  71. .. only:: snapshot
  72. .. parsed-literal::
  73. docker run -it -p8080:8080 \\
  74. --env INSTALL_EXTENSIONS=true \\
  75. --env STABLE_EXTENSIONS="ysld,h2" \\
  76. docker.osgeo.org/geoserver:|version|.x
  77. This will download and install the YSLD and H2 extension.
  78. Here is a list of available extensions (taken from the `build server <https://build.geoserver.org/geoserver/main/ext-latest/>`__):
  79. ::
  80. app-schema gdal jp2k ogr-wps web-resource
  81. authkey geofence libjpeg-turbo oracle wmts-multi-dimensional
  82. cas geofence-server mapml params-extractor wps-cluster-hazelcast
  83. charts geopkg-output mbstyle printing wps-download
  84. control-flow grib mongodb pyramid wps-jdbc
  85. css gwc-s3 monitor querylayer wps
  86. csw h2 mysql sldservice xslt
  87. db2 imagemap netcdf-out sqlserver ysld
  88. dxf importer netcdf vectortiles
  89. excel inspire ogr-wfs wcs2_0-eo
  90. Testing Geoserver Community modules
  91. -----------------------------------
  92. Working with a Nightly build is a good way to test community modules and provide feedback to developers working on new functionality.
  93. .. only:: not snapshot
  94. Community modules are shared as part GeoServer |release| source code bundle to be compiled for testing
  95. and feedback by the developer community.
  96. When the developer has met the documentation and quality assurance standards for GeoServer they may
  97. ask for the module to be included in GeoServer.
  98. If you are interested in helping out please contact the developer (list in the :file:`pom.xml` file for the module).
  99. Reference:
  100. * :developer:`community modules <policies/community-modules.html>` (Developer Guide)
  101. .. only:: snapshot
  102. To work with community modules you must be using the GeoServer |version|.x nightly build that matches the community module build:
  103. .. parsed-literal::
  104. docker run -it -p8080:8080 \\
  105. --env INSTALL_EXTENSIONS=true \\
  106. --env STABLE_EXTENSIONS="ysld,h2" \\
  107. --env COMMUNITY_EXTENSIONS="ogcapi-features,ogcapi-images,ogcapi-maps,ogcapi-styles,ogcapi-tiles" \\
  108. docker.osgeo.org/geoserver:|version|.x
  109. For the current list see GeoServer `build server <https://build.geoserver.org/geoserver/main/community-latest/>`__.
  110. ::
  111. activeMQ-broker jdbcconfig pgraster
  112. backup-restore jdbcstore proxy-base-ext
  113. cog jms-cluster s3-geotiff
  114. colormap libdeflate sec-keycloak
  115. cov-json mbtiles sec-oauth2-geonode
  116. dds mbtiles-store sec-oauth2-github
  117. dyndimension mongodb-schemaless sec-oauth2-google
  118. elasticsearch ncwms sec-oauth2-openid-connect
  119. features-templating netcdf-ghrsst smart-data-loader
  120. flatgeobuf notification solr
  121. gdal-wcs ogcapi-coverages spatialjson
  122. gdal-wps ogcapi-dggs stac-datastore
  123. geopkg ogcapi-features taskmanager-core
  124. gpx ogcapi-images taskmanager-s3
  125. gsr ogcapi-maps vector-mosaic
  126. gwc-azure-blobstore ogcapi-styles vsi
  127. gwc-distributed ogcapi-tiled-features webp
  128. gwc-mbtiles ogcapi-tiles wps-remote
  129. gwc-sqlite ogr-datastore rat
  130. hz-cluster opensearch-eo
  131. importer-jdbc
  132. jdbc-metrics