Run docker image on Jenkins do unit test

  1. Install Jenkins on Ubuntu 14.04
    https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu

  2. Install Docker
    https://docs.docker.com/engine/installation/linux/ubuntulinux/#/prerequisites-by-ubuntu-version

    Run docker image on Jenkins do unit test_第1张图片
    image.png

  3. Include Jenkins user to docker

//Add the docker group if it doesn't already exist.
sudo groupadd docker
//Add the connected user "${USERNAME}" to the docker group.
sudo gpasswd -a ${USER} docker
sudo usermod -aG docker jenkins

你可能感兴趣的:(Run docker image on Jenkins do unit test)