moul / travis-docker

:whale::man: Docker in Travis-CI
https://manfred.life/travis-docker
MIT License
106 stars 22 forks source link

installing docker 1.9.1 #38

Open sadovnikov opened 8 years ago

sadovnikov commented 8 years ago

Thanks for keeping this repository.

Is http://j.mp/install-travis-docker script expected to work with 1.9.1 version?

sudo: required

env:
  global:
    - DOCKER_VERSION=1.9.1  # Install Docker version 1.9.1

install:
  - curl -sLo - http://j.mp/install-travis-docker | sh -xe

We are trying to get 1.9.1 docker for our build https://github.com/ContainerSolutions/minimesos/pull/376, however installation fails https://travis-ci.org/ContainerSolutions/minimesos/builds/121740115

AppArmor parser error for /etc/apparmor.d/lxc-containers in /etc/apparmor.d/lxc-containers at line 5: Could not open 'tunables/global'
dpkg: error processing lxc (--configure):
 subprocess installed post-installation script returned error exit status 1
moul commented 8 years ago

Hi @sadovnikov,

I need to investigate, my first ideas are:

sadovnikov commented 8 years ago

HI @moul, thanks a lot for responding! Seems you did not see anything obviously wrong in our setup. I'll try to find an alternative way to get required version of docker on build boxes

sadovnikov commented 8 years ago

Just FYI, we've managed to get our builds running. However it's a work around ;-(

install:
# one liner installation of docker 1.9.1 below did not work (see https://github.com/moul/travis-docker/issues/38).
#  - curl -sLo - http://j.mp/install-travis-docker | sh -xe
# Therefore installing it through a script
  - sudo sh -c 'echo "deb https://apt.dockerproject.org/repo ubuntu-precise main" > /etc/apt/sources.list.d/docker.list'
  - sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
  - sudo apt-get update
  - sudo apt-key update
  - sudo apt-get -qqy install docker-engine=1.9.1-0~precise
# Has to run this script with sudo because custom installation does not allow $USER to use docker and it's not possible to relogin
  - chmod +x pull-containers.sh && sudo ./pull-containers.sh

# Has to run the build script with sudo because custom installation does not allow $USER to use docker and it's not possible to relogin
script: sudo ./gradlew clean build --info --stacktrace

I got a bit lost in Travis CI projects on GitHub. Where would be the place to help to introduce (optional) versions for services?

services:
  - docker=1.9.1

or

env:
  global:
    - DOCKER_VERSION=1.9.1  # Install Docker version 1.9.1

services:
  - docker
moul commented 8 years ago

Just FYI, we've managed to get our builds running. However it's a work around ;-(

@sadovnikov wow, nice !


I got a bit lost in Travis CI projects on GitHub. Where would be the place to help to introduce (optional) versions for services?

I suggest you to try this repo: https://github.com/travis-ci/travis-ci/

Vanuan commented 8 years ago

What about 1.10?

moul commented 8 years ago

@Vanuan, the issue is certainly the same for these two versions, I still think about a missing kernel module