diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..6647fc9 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +**/Dockerfile* +**/.dockerignore +**/.git +**/.travis.yml diff --git a/.travis.yml b/.travis.yml index 0477c90..d49a897 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,12 +20,17 @@ services: docker cache: directories: - /home/travis/docker/ + env: global: - DOCKER_CACHE_FILE=/home/travis/docker/cache.tar.gz + matrix: + - UBUNTU_RELEASE=trusty + - UBUNTU_RELEASE=xenial + before_install: scripts/load_docker_cache.sh install: true script: - - docker build ${TRAVIS_BUILD_DIR} -t cartographer + - docker build ${TRAVIS_BUILD_DIR} -t cartographer:${UBUNTU_RELEASE} -f Dockerfile.${UBUNTU_RELEASE} - scripts/save_docker_cache.sh diff --git a/Dockerfile b/Dockerfile.trusty similarity index 100% rename from Dockerfile rename to Dockerfile.trusty diff --git a/Dockerfile.xenial b/Dockerfile.xenial new file mode 100644 index 0000000..0933b6f --- /dev/null +++ b/Dockerfile.xenial @@ -0,0 +1,25 @@ +# Copyright 2016 The Cartographer Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FROM ubuntu:xenial + +# Xenial's base image doesn't ship with sudo. +RUN apt-get update && apt-get install -y sudo && rm -rf /var/lib/apt/lists/* + +COPY scripts/install_debs.sh cartographer/scripts/ +RUN cartographer/scripts/install_debs.sh && rm -rf /var/lib/apt/lists/* +COPY scripts/install_ceres.sh cartographer/scripts/ +RUN cartographer/scripts/install_ceres.sh && rm -rf ceres-solver +COPY . cartographer +RUN cartographer/scripts/install_cartographer.sh && rm -rf cartographer