diff --git a/.dockerignore b/.dockerignore index 8ff29f129..eccb374e7 100644 --- a/.dockerignore +++ b/.dockerignore @@ -2,3 +2,4 @@ .gitignore .git Dockerfile +Dockerfile.centos7 diff --git a/.travis.yml b/.travis.yml index 0ea65b97d..cd905fff9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,20 @@ sudo: false matrix: include: - # test on docker + # test on docker+centos7 + - os: linux + compiler: clang + services: + - docker + sudo: true + dist: trusty + env: DOCKERFILE=Dockerfile.centos7 + before_install: [] + install: + - docker build -t tippecanoe-image -f ${DOCKERFILE} . + script: + - docker run -it tippecanoe-image + # test on docker+ubuntu - os: linux compiler: clang services: diff --git a/Dockerfile b/Dockerfile index 9622e1e95..6a9e5e13f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,5 +15,5 @@ COPY . /tmp/tippecanoe-src RUN make \ && make install -# Run the default command to show usage +# Run the tests CMD make test diff --git a/Dockerfile.centos7 b/Dockerfile.centos7 new file mode 100644 index 000000000..c330de2f1 --- /dev/null +++ b/Dockerfile.centos7 @@ -0,0 +1,15 @@ +FROM centos:7 + +RUN yum install -y make sqlite-devel zlib-devel bash git gcc-c++ + +# 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 + +# Run the tests +CMD make test