Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? #9

Open
zbxzxx opened this issue May 14, 2019 · 0 comments

Comments

@zbxzxx
Copy link

zbxzxx commented May 14, 2019

my OS is ubuntu 16.04

when i invoke the jenkins build ,i find the result

Started by user admin
Building in workspace /tmp/jenkins-buildenv/Docker_test-job/workspace
No credentials specified

git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
git config remote.origin.url https://github.com/jamtur01/docker-jenkins-sample.git # timeout=10
Fetching upstream changes from https://github.com/jamtur01/docker-jenkins-sample.git
git --version # timeout=10
git fetch --tags --progress https://github.com/jamtur01/docker-jenkins-sample.git +refs/heads/:refs/remotes/origin/
git rev-parse refs/remotes/origin/master^{commit} # timeout=10
git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision 7d027a4 (refs/remotes/origin/master)
git config core.sparsecheckout # timeout=10
git checkout -f 7d027a4
Commit message: "Update Dockerfile"
git rev-list --no-walk 7d027a4 # timeout=10
[workspace] $ /bin/sh -xe /tmp/jenkins651930525195439723.sh

  • sudo docker build .
  • tail -1
  • awk { print $NF }
    Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
  • IMAGE=
  • MNT=/tmp/jenkins-buildenv/Docker_test-job/workspace/..
  • sudo docker run -d -v /tmp/jenkins-buildenv/Docker_test-job/workspace/..:/opt/project/ /bin/bash -c cd /opt/project/workspace && rake spec
    docker: invalid reference format.
    See 'docker run --help'.
  • CONTAINER=
    Build step 'Execute shell' marked build as failure
    Recording test results
    ERROR: Step ‘Publish JUnit test result report’ failed: No test report files were found. Configuration error?
    Finished: FAILURE

then i see
https://docs.docker.com/install/linux/docker-ce/binaries/

Before attempting to install Docker from binaries, be sure your host machine meets the prerequisites:

A 64-bit installation
Version 3.10 or higher of the Linux kernel. The latest version of the kernel available for your platform is recommended.
iptables version 1.4 or higher
git version 1.7 or higher
A ps executable, usually provided by procps or a similar package.
XZ Utils 4.9 or higher
A properly mounted cgroupfs hierarchy; a single, all-encompassing cgroup mount point is not sufficient. See Github issues #2683, #3485, #4568).

then i use
docker exec -t -t jenkins /bin/bash
and
sudo apt-get install iptables
then it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant