Merge pull request #419 from Burke9077/master

Add basic support for Docker
This commit is contained in:
Eric Fischer 2017-05-18 11:47:21 -07:00 committed by GitHub
commit d0980e29d0
3 changed files with 46 additions and 0 deletions

4
.dockerignore Normal file
View File

@ -0,0 +1,4 @@
# Don't copy Dockerfile or git items
.gitignore
.git
Dockerfile

24
Dockerfile Normal file
View 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

View File

@ -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
-------