Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exporting Docker container does not come with database #472

Open
IndigoCurnick opened this issue Sep 12, 2023 · 0 comments
Open

Exporting Docker container does not come with database #472

IndigoCurnick opened this issue Sep 12, 2023 · 0 comments
Labels

Comments

@IndigoCurnick
Copy link

Describe the bug
I'm trying to export the Docker container with a built Nomaintim database inside. I can create the container as described in the readme. I can also stop that container and run it again without issues. However, when I export it and then create a new container from the export I get errors related to needing to specify PBF_URL.

You need to specify either the PBF_URL or PBF_PATH environment variable
docker run -e PBF_URL=https://download.geofabrik.de/europe/monaco-latest.osm.pbf ...
docker run -e PBF_PATH=/nominatim/data/monaco-latest.osm.pbf ...

However, if I look inside the tar file I export I can see that the database is present. I would expect it to not need these flags as I don't want it to rebuild the database.

Related to #343

To Reproduce

Create the initial Nominatim container

docker run -it --shm-size=1g \
  -e PBF_URL=https://download.geofabrik.de/europe/monaco-latest.osm.pbf \
  -e REPLICATION_URL=https://download.geofabrik.de/europe/monaco-updates/ \
  -e IMPORT_WIKIPEDIA=false \
  -e NOMINATIM_PASSWORD=very_secure_password \
  -v nominatim-data:/var/lib/postgresql/14/main \
  -p 8080:8080 \
  --name nominatim \
  mediagis/nominatim:4.2

Export to a gzip file

docker export nominatim | gzip > nominatim.gz

Import, use a different name for clarity

zcat nominatim.gz | docker import - nom

Create the container

docker run -p 8080:8080 -t nom /app/start.sh

Expected behavior
The Docker container to load with the already built

Desktop / Server (please complete the following information):

  • OS & Version: Manjaro
  • Docker Version: 24.0.5, build ced0996600
  • Nominatim Version: 4.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant