|
|
||
|---|---|---|
| .. | ||
| README-short.txt | ||
| README.md | ||
| compose.yaml | ||
| content.md | ||
| github-repo | ||
| license.md | ||
| logo.png | ||
| maintainer.md | ||
| metadata.json | ||
| variant-postgres.md | ||
| variant.md | ||
README.md
Note: this is the "per-architecture" repository for the arm32v5 builds of the geonetwork official image -- for more information, see "Architectures other than amd64?" in the official images documentation and "An image's source changed in Git, now what?" in the official images FAQ.
Quick reference
-
Maintained by:
GeoNetwork opensource -
Where to get help:
the Docker Community Slack, Server Fault, Unix & Linux, or Stack Overflow
Supported tags and respective Dockerfile links
WARNING: THIS IMAGE IS NOT SUPPORTED ON THE arm32v5 ARCHITECTURE
Quick reference (cont.)
-
Where to file issues:
https://github.com/geonetwork/docker-geonetwork/issues -
Supported architectures: (more info)
amd64,arm32v7,arm64v8,ppc64le -
Published image artifact details:
repo-info repo'srepos/geonetwork/directory (history)
(image metadata, transfer size, etc) -
Image updates:
official-images repo'slibrary/geonetworklabel
official-images repo'slibrary/geonetworkfile (history) -
Source of this description:
docs repo'sgeonetwork/directory (history)
What is GeoNetwork?
GeoNetwork is a catalog application to manage spatially referenced resources. It provides powerful metadata editing and search functions as well as an interactive web map viewer.
The GeoNetwork project started out in year 2001 as a Spatial Data Catalogue System for the Food and Agriculture organisation of the United Nations (FAO), the United Nations World Food Programme (WFP) and the United Nations Environmental Programme (UNEP).
At present the project is widely used as the basis of Spatial Data Infrastructures all around the world.
GeoNetwork has been developed to connect spatial information communities and their data using a modern architecture, which is at the same time powerful and low cost, based on the principles of Free and Open Source Software (FOSS) and International and Open Standards for services and protocols (e.g.: ISO/TC211, OGC).
The project is part of the Open Source Geospatial Foundation ( OSGeo ) and can be found at GeoNetwork opensource. GeoNetwork has been developed to connect spatial information communities and their data using a modern architecture, which is at the same time powerful and low cost.
How to use this image
GeoNetwork 4 uses an Elasticsearch server to store the index of the documents it manages so it can't be run without configuring the URL of the Elasticsearch server.
This is a quick example of how to get GeoNetwork 4.4 Latest up and running for demo purposes. This configuration doesn't keep the data if containers are removed.
docker pull elasticsearch:7.17.15
docker pull arm32v5/geonetwork:4
docker network create gn-network
docker run -d --name my-es-host --network gn-network -e "discovery.type=single-node" elasticsearch:7.17.15
docker run --name geonetwork-host --network gn-network -e GN_CONFIG_PROPERTIES="-Des.host=my-es-host -Des.protocol=http -Des.port=9200 -Des.url=http://my-es-host:9200" -p 8080:8080 arm32v5/geonetwork:4
For GeoNetwork 4.2 Stable:
docker pull elasticsearch:7.17.15
docker pull arm32v5/geonetwork:4.2
docker network create gn-network
docker run -d --name my-es-host --network gn-network -e "discovery.type=single-node" elasticsearch:7.17.15
docker run --name geonetwork-host --network gn-network -e ES_HOST=my-es-host -e ES_PROTOCOL=http -e ES_PORT=9200 -p 8080:8080 arm32v5/geonetwork:4.2
To be sure about what Elasticsearch version to use you can check the GeoNetwork documentation for your GN version or the es.version property in the pom.xml file of the GeoNetwork release used.
Default credentials
After installation, use the default credentials: admin (username) and admin (password). It is recommended to update the default password after installation.
Elasticsearch configuration
Java properties (version 4.4.0 and newer)
Since GeoNetwork 4.4.0, use Java properties passed in the GN_CONFIG_PROPERTIES environment variable for Elasticsearch connection configuration:
es.host: optional (defaultlocalhost): The host name of the Elasticsearch server.es.portoptional (default9200): The port where Elasticsearch server is listening to.es.protocoloptional (defaulthttp): The protocol used to talk to Elasticsearch. Can behttporhttps.es.url: mandatory if host, port or protocol aren't the default values (defaulthttp://localhost:9200): Full URL of the Elasticsearch server.es.index.recordsoptional (defaultgn_records): In case you have more than GeoNetwork instance using the same Elasticsearch cluster each one needs to use a different index name. Use this variable to define the name of the index used by each GeoNetwork.es.usernameoptional (default empty): username used to connect to Elasticsearch.es.passwordoptional (default empty): password used to connect to Elasticsearch.kb.urloptional (defaulthttp://localhost:5601): The URL where Kibana is listening.
Example Docker Compose YAML snippet:
services:
geonetwork:
image: arm32v5/geonetwork:4.4
environment:
GN_CONFIG_PROPERTIES: >-
-Des.host=elasticsearch
-Des.protocol=http
-Des.port=9200
-Des.url=http://elasticsearch:9200
-Des.username=my_es_username
-Des.password=my_es_password
-Dkb.url=http://kibana:5601
Environment variables (version 4.2 and older)
For versions older than 4.4.0, configure Elasticsearch using environment variables:
ES_HOSTmandatory: The host name of the Elasticsearch server.ES_PORToptional (default9200): The port where Elasticsearch server is listening to.ES_PROTOCOLoptional (defaulthttp): The protocol used to talk to Elasticsearch. Can behttporhttps.ES_INDEX_RECORDSoptional (defaultgn_records): In case you have more than GeoNetwork instance using the same Elasticsearch cluster each one needs to use a different index name. Use this variable to define the name of the index used by each GeoNetwork.ES_USERNAMEoptional (default empty): username used to connect to Elasticsearch.ES_PASSWORDoptional (default empty): password used to connect to Elasticsearch.KB_URLOptional (defaulthttp://localhost:5601): The URL where Kibana is listening.
Database configuration
By default GeoNetwork uses a local H2 database for demo use (this one is not recommended for production). The image contains JDBC drivers for PostgreSQL and MySQL. To configure the database connection use these environment variables:
GEONETWORK_DB_TYPE: The type of database to use. Valid values arepostgres,postgres-postgis,mysql. The image can be extended including other drivers and these other types could be used too:db2,h2,oracle,sqlserver. The JAR drivers for these other databases would need to be added to/opt/geonetwork/WEB-INF/libmounting them as binds or extending the official image.GEONETWORK_DB_HOST: The database host name.GEONETWORK_DB_PORT: The database port.GEONETWORK_DB_NAME: The database name.GEONETWORK_DB_USERNAME: The username used to connect to the database.GEONETWORK_DB_PASSWORD: The password used to connect to the database.GEONETWORK_DB_CONNECTION_PROPERTIES: Additional properties to be added to the connection string, for examplesearch_path=test,public&ssl=truewill produce a JDBC connection string likejdbc:postgresql://localhost:5432/postgres?search_path=test,public&ssl=true
Start GeoNetwork
This command will start a debian-based container, running a Tomcat (GN 3) or Jetty (GN 4) web server, with a GeoNetwork WAR deployed on the server:
docker run --name some-geonetwork -d arm32v5/geonetwork
Publish port
GeoNetwork listens on port 8080. If you want to access the container at the host, you must publish this port. For instance, this, will redirect all the container traffic on port 8080, to the same port on the host:
docker run --name some-geonetwork -d -p 8080:8080 arm32v5/geonetwork
Then, if you are running docker on Linux, you may access geonetwork at http://localhost:8080/geonetwork.
Set the data directory and H2 db file
The data directory is the location on the file system where the catalog stores much of its custom configuration and uploaded files. It is also where it stores a number of support files, used for various purposes (e.g.: spatial index, thumbnails). The default variant also uses a local H2 database to store the metadata catalog itself.
By default, GeoNetwork sets the data directory on /opt/geonetwork/WEB-INF/data and H2 database file to the Jetty dir /var/lib/jetty/gn.h2.db (since GN 4.0.0) or Tomcat /usr/local/tomcat/gn.h2.db (for GN 3), but you may override these values by injecting environment variables into the container: - -e DATA_DIR=... (defaults to /opt/geonetwork/WEB-INF/data) and -e GEONETWORK_DB_NAME=... (defaults to gn which sets up database gn.h2.db in tomcat bin dir /usr/local/tomcat). Note that setting the database location via GEONETWORK_DB_NAME only works from version 3.10.3 onwards.
Since version 4.4.0 the data directory needs to be configued using Java properties passed in the GN_CONFIG_PROPERTIES environment variable. For example:
docker run --name some-geonetwork -d -p 8080:8080 -e GN_CONFIG_PROPERTIES="-Dgeonetwork.dir=/catalogue-data" -e GEONETWORK_DB_NAME=/catalogue-data/db/gn arm32v5/geonetwork
Persisting data
To set the data directory to /catalogue-data/data and H2 database file to /catalogue-data/db/gn.h2.db so they both persist through restarts:
- GeoNetwork 4.2 and older
docker run --name some-geonetwork -d -p 8080:8080 -e DATA_DIR=/catalogue-data/data -e GEONETWORK_DB_NAME=/catalogue-data/db/gn arm32v5/geonetwork:3
- Since GeoNetwork 4.4.0
docker run --name some-geonetwork -d -p 8080:8080 -e GN_CONFIG_PROPERTIES="-Dgeonetwork.dir=/catalogue-data" -e GEONETWORK_DB_NAME=/catalogue-data/db/gn arm32v5/geonetwork
If you want the data directory to live beyond restarts, or even destruction of the container, you can mount a directory from the docker engine's host into the container. - -v /host/path:/path/to/data/directory. For instance this, will mount the host directory /host/geonetwork-docker into /catalogue-data on the container:
- GeoNetwork 4.2 and older
docker run --name some-geonetwork -d -p 8080:8080 -e DATA_DIR=/catalogue-data/data -e GEONETWORK_DB_NAME=/catalogue-data/db/gn -v /host/geonetwork-docker:/catalogue-data arm32v5/geonetwork:3
- GeoNetwork 4.4.0 and newer
docker run --name some-geonetwork -d -p 8080:8080 -e GN_CONFIG_PROPERTIES="-Dgeonetwork.dir=/catalogue-data" -e GEONETWORK_DB_NAME=/catalogue-data/db/gn -v /host/geonetwork-docker:/catalogue-data arm32v5/geonetwork
... via docker compose
Example compose.yaml for geonetwork:
# GeoNetwork
#
# Access via "http://localhost:8080/geonetwork"
#
# Default user: admin
# Default password: admin
volumes:
geonetwork:
esdata:
pgdata:
pglog:
services:
geonetwork:
image: geonetwork:4.4
healthcheck:
test: curl http://localhost:8080/
interval: 5s
timeout: 5s
retries: 30
restart: always
volumes:
- geonetwork:/catalogue-data
depends_on:
database:
condition: service_healthy
ports:
- 8080:8080
environment:
WEBAPP_CONTEXT_PATH: /geonetwork
DATA_DIR: /catalogue-data
TZ: Europe/Amsterdam
JAVA_OPTS: >-
--add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED
-Djava.security.egd=file:/dev/./urandom -Djava.awt.headless=true
-Xms512M -Xss512M -Xmx2G -XX:+UseConcMarkSweepGC
-Djetty.httpConfig.requestHeaderSize=32768
-Dorg.eclipse.jetty.server.Request.maxFormContentSize=500000
-Dorg.eclipse.jetty.server.Request.maxFormKeys=4000
# For remote debug
# -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
GN_CONFIG_PROPERTIES: >-
-Dgeonetwork.dir=/catalogue-data
-Dgeonetwork.formatter.dir=/catalogue-data/data/formatter
-Dgeonetwork.schema.dir=/opt/geonetwork/WEB-INF/data/config/schema_plugins
-Dgeonetwork.indexConfig.dir=/opt/geonetwork/WEB-INF/data/config/index
-Dgeonetwork.schemapublication.dir=/opt/geonetwork/WEB-INF/data/resources/schemapublication
-Dgeonetwork.htmlcache.dir=/opt/geonetwork/WEB-INF/data/resources/htmlcache
-Des.host=elasticsearch
-Des.protocol=http
-Des.port=9200
-Des.url=http://elasticsearch:9200
-Des.username=
-Des.password=
-Dgeonetwork.ESFeaturesProxy.targetUri=http://elasticsearch:9200/gn-features/{_}
-Dgeonetwork.HttpDashboardProxy.targetUri=http://kibana:5601
GEONETWORK_DB_TYPE: postgres-postgis
GEONETWORK_DB_HOST: database
GEONETWORK_DB_PORT: 5432
GEONETWORK_DB_NAME: geonetwork
GEONETWORK_DB_USERNAME: geonetwork
GEONETWORK_DB_PASSWORD: geonetwork
database:
image: postgis/postgis:16-3.4
environment:
POSTGRES_USER: geonetwork
POSTGRES_PASSWORD: geonetwork
POSTGRES_DB: geonetwork
command: [postgres, -c, log_statement=all, -c, logging_collector=true, -c, log_file_mode=0644, -c, log_directory=/var/log/postgresql, -c, log_filename=postgresql.log]
healthcheck:
test: [CMD-SHELL, pg_isready -U postgres]
interval: 5s
timeout: 5s
retries: 5
volumes:
- pgdata:/var/lib/postgresql/data
- pglog:/var/log/postgresql
elasticsearch:
image: elasticsearch:7.17.15
ports:
- 9200:9200
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
healthcheck:
test: curl -s http://localhost:9200 >/dev/null || exit 1
interval: 10s
timeout: 2s
retries: 10
start_period: 2m
environment:
ES_JAVA_OPTS: -Xms1G -Xmx1G
discovery.type: single-node
volumes:
- esdata:/usr/share/elasticsearch/data
kibana:
image: kibana:7.17.15
environment:
SERVER_NAME: kibana
ELASTICSEARCH_URL: http://elasticsearch:9200/
SERVER_BASEPATH: /geonetwork/dashboards
SERVER_REWRITEBASEPATH: 'false'
KIBANA_INDEX: .dashboards
XPACK_MONITORING_UI_CONTAINER_ELASTICSEARCH_ENABLED: 'true'
depends_on:
elasticsearch:
condition: service_healthy
Run docker compose up, wait for it to initialize completely, and visit http://localhost:8080/geonetwork or http://host-ip:8080/geonetwork (as appropriate).
Default credentials
After installation a default user with name admin and password admin is created. Use this credentials to start with. It is recommended to update the default password after installation.
License
View license information for the software contained in this image.
As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).
Some additional license information which was able to be auto-detected might be found in the repo-info repository's geonetwork/ directory.
As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.
