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

Docker image creation #164

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,14 @@ PBF file size: 1.7 GB

![Poland PBF file result](https://raw.githubusercontent.com/kraina-ai/quackosm/main/docs/assets/images/poland_disk_spillage.png)

## Docker
A Dockerized version is available to build in the `docker` directory.
```
cd docker
docker-compose build
docker-compose run region-latest.osm.pbf
```

## License

The library is distributed under Apache-2.0 License.
Expand Down
21 changes: 21 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM python:3.11-slim-bookworm

# install QuackOSM CLI
# since this is built from a slim base image, build-essential is required to compile python-geohash

RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
&& pip install --no-cache-dir \
quackosm[cli] \
&& apt-get purge -y --auto-remove \
build-essential \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# purging build-essential saves ~290 MB in the final image

WORKDIR /data
VOLUME /data

ENTRYPOINT [ "quackosm" ]
CMD [ "--help" ]
6 changes: 6 additions & 0 deletions docker/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
services:
quackosm:
build: .
image: quackosm
volumes:
- ./data:/data
Loading