mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-03-26 05:37:38 +00:00
Merge pull request #419 from Burke9077/master
Add basic support for Docker
This commit is contained in:
commit
d0980e29d0
4
.dockerignore
Normal file
4
.dockerignore
Normal file
@ -0,0 +1,4 @@
|
||||
# Don't copy Dockerfile or git items
|
||||
.gitignore
|
||||
.git
|
||||
Dockerfile
|
24
Dockerfile
Normal file
24
Dockerfile
Normal file
@ -0,0 +1,24 @@
|
||||
# Start from ubuntu
|
||||
FROM ubuntu:17.04
|
||||
|
||||
# Update repos and install dependencies
|
||||
RUN apt-get update \
|
||||
&& apt-get -y upgrade \
|
||||
&& apt-get -y install build-essential libsqlite3-dev zlib1g-dev
|
||||
|
||||
# Create a directory and copy in all files
|
||||
RUN mkdir -p /tmp/tippecanoe-src
|
||||
WORKDIR /tmp/tippecanoe-src
|
||||
COPY . /tmp/tippecanoe-src
|
||||
|
||||
# Build tippecanoe
|
||||
RUN make \
|
||||
&& make install
|
||||
|
||||
# Remove the temp directory and unneeded packages
|
||||
WORKDIR /
|
||||
RUN rm -rf /tmp/tippecanoe-src \
|
||||
&& apt-get -y remove --purge build-essential && apt-get -y autoremove
|
||||
|
||||
# Run the default command to show usage
|
||||
CMD tippecanoe --help
|
18
README.md
18
README.md
@ -52,6 +52,24 @@ You can concatenate multiple GeoJSON features or files together,
|
||||
and it will parse out the features and ignore whatever other objects
|
||||
it encounters.
|
||||
|
||||
Docker Image
|
||||
------------
|
||||
|
||||
A tippecanoe Docker image can be built from source and executed as a task to
|
||||
automatically install dependencies and allow tippecanoe to run on any system
|
||||
supported by Docker.
|
||||
|
||||
```docker
|
||||
$ docker build -t tippecanoe:latest .
|
||||
$ docker run -it --rm \
|
||||
-v /tiledata:/data \
|
||||
tippecanoe:latest \
|
||||
tippecanoe --output=/data/output.mbtiles /data/example.geojson
|
||||
```
|
||||
|
||||
The commands above will build a Docker image from the source and compile the
|
||||
latest version. The image supports all tippecanoe flags and options.
|
||||
|
||||
Options
|
||||
-------
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user