Dear all,
Have tryed the Ricardo suggestion and also created a volume specifically for the “geontework_data” (under volumes tag in the docker-compose file).
Although both of them are populated with the files (data, configuration and so forth), every time I stop and remove the geonetwork docker container and start it again it doesn’t detect the files already exist and says the database is empty (althought I’ve configured it with some harvesting sources and executed them, collection some metadata records).
I’m I missing something ? Is there a specific configuration of the geonetework (other than redefining the folder path) ?
Please let me know.
Thank you in davance for your time on this issue.
BR,

|
Carlos Figueiredo
Technical Manager / Senior System Analyst
Defence & Security Systems
carlos.figueiredo@anonymised.com
|
Tel: +351.212945900
Mobile: +351. 937 673 523
Fax: +351.212945999
|
Rua Calvet Magalhães, 245
2770-153 Paço de Arcos · Portugal
www.edisoft.pt
|

|
……………………………………………………………………………
A informação contida neste e-mail e quaisquer documentos anexos são propriedade da EDISOFT e poderão ser confidenciais. Se não for o destinatário pretendido, por favor, comunique-nos de imediato, enviando-nos esta mensagem de volta e destruindo-a em seguida. Fica desde já advertido de que é estritamente proibida qualquer revisão, divulgação, distribuição, cópia ou qualquer outra utilização deste e-mail.
The information contained in this e-mail and any attachments are the property of EDISOFT and may be confidential. If you are not the intended recipient, please notify us immediately, send this message back to us and destroy it. You are hereby notified that any review, dissemination, distribution, copying or otherwise use of this e-mail is strictly prohibited
From: Carlos Figueiredo
Sent: segunda-feira, 18 de fevereiro de 2019 15:42
To: ‘Ricardo Sena’; ‘geonetwork-devel@anonymised.com.sourceforge.net’; ‘Geonetwork-Users@anonymised.com’
Subject: RE: [GeoNetwork-devel] [geionetwork] and Docker
Hello Ricardo,
Have been analyzing your solution and the docker deployment and have a couple of questions for you, if you have a bit of time for answering them:
1/ the solution you proposed seem to assume that you are using the default database for storing the metadata, which I think is H2.
2/ if you configure geonetwork to use postgresql, for example, do you know what configuration files are affected?
3/ or it is required to map all the DATa_DIR folder ?
4/ at this time I’m more interested in persisting only the configuration and not the metadata database, as we use harvesting procedures to update it. And the harvesting configurations are one of the things we need to persist.
Please let me know your comments.
Thanks and BR,
![]()
|
Carlos Figueiredo
Technical Manager / Senior System Analyst
Defence & Security Systems
carlos.figueiredo@anonymised.com
|
Tel: +351.212945900
Mobile: +351. 937 673 523
Fax: +351.212945999
|
Rua Calvet Magalhães, 245
2770-153 Paço de Arcos · Portugal
www.edisoft.pt
|
![]()
|
……………………………………………………………………………
A informação contida neste e-mail e quaisquer documentos anexos são propriedade da EDISOFT e poderão ser confidenciais. Se não for o destinatário pretendido, por favor, comunique-nos de imediato, enviando-nos esta mensagem de volta e destruindo-a em seguida. Fica desde já advertido de que é estritamente proibida qualquer revisão, divulgação, distribuição, cópia ou qualquer outra utilização deste e-mail.
The information contained in this e-mail and any attachments are the property of EDISOFT and may be confidential. If you are not the intended recipient, please notify us immediately, send this message back to us and destroy it. You are hereby notified that any review, dissemination, distribution, copying or otherwise use of this e-mail is strictly prohibited
From: Carlos Figueiredo
Sent: segunda-feira, 18 de fevereiro de 2019 13:34
To: ‘Ricardo Sena’; geonetwork-devel@lists.sourceforge.net; ‘Geonetwork-Users@anonymised.com’
Subject: RE: [GeoNetwork-devel] [geionetwork] and Docker
Hello Ricardo,
Thank you for your email.
I will give it a try and let you know.
BR,
![]()
|
Carlos Figueiredo
Technical Manager / Senior System Analyst
Defence & Security Systems
carlos.figueiredo@anonymised.com
|
Tel: +351.212945900
Mobile: +351. 937 673 523
Fax: +351.212945999
|
Rua Calvet Magalhães, 245
2770-153 Paço de Arcos · Portugal
www.edisoft.pt
|
![]()
|
……………………………………………………………………………
A informação contida neste e-mail e quaisquer documentos anexos são propriedade da EDISOFT e poderão ser confidenciais. Se não for o destinatário pretendido, por favor, comunique-nos de imediato, enviando-nos esta mensagem de volta e destruindo-a em seguida. Fica desde já advertido de que é estritamente proibida qualquer revisão, divulgação, distribuição, cópia ou qualquer outra utilização deste e-mail.
The information contained in this e-mail and any attachments are the property of EDISOFT and may be confidential. If you are not the intended recipient, please notify us immediately, send this message back to us and destroy it. You are hereby notified that any review, dissemination, distribution, copying or otherwise use of this e-mail is strictly prohibited
From: Ricardo Sena [mailto:ricardo.sena@anonymised.com]
Sent: segunda-feira, 18 de fevereiro de 2019 13:29
To: geonetwork-devel@lists.sourceforge.net; ‘Geonetwork-Users@anonymised.com’
Subject: RE: [GeoNetwork-devel] [geionetwork] and Docker
Dear Carlos,
My name is Ricardo Sena and I’m collaborating on the implementation of the new version of SNIG Geoportal, which is based on Geonetwork. We are using Docker to deploy Geonetwork and we managed to store some configuration and data on the host, persisting them when we recreate our docker image/container. One way of doing this is to attach a host directory to a container and use it as the Geonetwork data directory. This is the command we use to run the container:
docker run --name geonetwork_dev -d -p 8086:8080 -e POSTGRES_DB_HOST=<db_host> -e POSTGRES_DB_PORT=5432 -e POSTGRES_DB_NAME=<db_name> -e POSTGRES_DB_USERNAME=<db_user> -e POSTGRES_DB_PASSWORD=<db_password> -e DATA_DIR=/var/lib/geonetwork_data -v /home/dgterritorio/geonetwork_dev_data:/var/lib/geonetwork_data geonetwork_dev
For this particular case, the important parts are:
-e DATA_DIR=/var/lib/geonetwork_data → sets the geonetwork data dir location
-v /home/geonetwork_dev_data:/var/lib/geonetwork_data → attach “/home/geonetwork_dev_data” host directory as “/var/lib/geonetwork_data” container directory
We are not using docker-compose at the moment, but I think this can be also easily done with it.
Hope it helps.
Best regards
Ricardo Sena
Managing Partner

Email: ricardo.sena@anonymised.com
Tlm: 912 287 483
Site: http://www.wkt.pt
From: Carlos Figueiredo [mailto:Carlos.Figueiredo@anonymised.com]
Sent: 18 de fevereiro de 2019 09:48
To: Devel geonetwork-devel@lists.sourceforge.net; Geonetwork-Users@anonymised.com
Subject: [GeoNetwork-devel] [geionetwork] and Docker
Dear All, José and Maria,
In a EU project (H2020 Odyssea) that we are using Geonetwork, docker is a requirement to deploy the several components where Geonetwork is one of them. This is done using an empty customized CentOS docker image where, using a DOCKER file the JAVA, TOMCAT and Geonetwork are configured to be executed.
Finally a docker-compose file is used to orchestrate the several docker images (being the Geonetwork one of them).
We’ve managed to do the above (with empty CentOS image) using an externalized postgres database (on the host filesystem) in order not to lose (persist) the information. This is ok.
The problem is that once you configure the database access an then latter you down the docker-compose (stop and remove the images) the configuration is lost (not the db itself as it is mounted externally).
So, as you may imagine, we would like to persist the configuration of Geonetwork outside the docker image, on the persistent storage of the host, for example.
It is possible to do this ?
Can you please assist us ?
Please let me know ASAP.
Thank you for your time and best regards,
![]()
|
Carlos Figueiredo
Technical Manager / Senior System Analyst
Defence & Security Systems
carlos.figueiredo@anonymised.com
|
Tel: +351.212945900
Mobile: +351. 937 673 523
Fax: +351.212945999
|
Rua Calvet Magalhães, 245
2770-153 Paço de Arcos · Portugal
www.edisoft.pt
|
![]()
|
……………………………………………………………………………
A informação contida neste e-mail e quaisquer documentos anexos são propriedade da EDISOFT e poderão ser confidenciais. Se não for o destinatário pretendido, por favor, comunique-nos de imediato, enviando-nos esta mensagem de volta e destruindo-a em seguida. Fica desde já advertido de que é estritamente proibida qualquer revisão, divulgação, distribuição, cópia ou qualquer outra utilização deste e-mail.
The information contained in this e-mail and any attachments are the property of EDISOFT and may be confidential. If you are not the intended recipient, please notify us immediately, send this message back to us and destroy it. You are hereby notified that any review, dissemination, distribution, copying or otherwise use of this e-mail is strictly prohibited