geonetwork / docker-geonetwork

Official Docker image repository for GeoNetwork
38 stars 39 forks source link

Release of GeoNetwork 4.0.4. #68

Closed fxprunayre closed 3 years ago

juanluisrp commented 3 years ago

Running the image I see this warning:

Password database encryptor initialized - Keep the file /var/lib/jetty/webapps/geonetwork/WEB-INF/data/config/encryptor.properties safe and make a backup. When upgrading to a newer version of GeoNetwork the file must be restored, otherwise GeoNetwork will not be able to decrypt passwords already stored in the database.

However the data directory is set to -Dgeonetwork.data.dir=/catalogue-data. Is there any way to specify the path of encryptor.properties so we can put it in the data directory and keep it when the container is destroyed/re-created? @fxprunayre @josegar74

juanluisrp commented 3 years ago

In the meantime I can mount the file directly into the container:

touch encryptor.properties

https://github.com/geonetwork/docker-geonetwork/pull/68/files#diff-b696ff9eb7241c62028b666784478b8503796af86ee66c7e3c0d2b9b7c31b79eR99-R101

    volumes:
      - geonetwork:/catalogue-data
      - ./encryptor.properties:/var/lib/jetty/webapps/geonetwork/WEB-INF/data/config/encryptor.properties 

An empty encryptor.properties files needs to exists before running docker-compose up so Docker doesn't create a directory instead of a file.

juanluisrp commented 3 years ago

Created PR to official images repo https://github.com/docker-library/official-images/pull/10143.