projectatomic / nulecule

[UNMAINTAINED] Specification describing a container-based application
209 stars 46 forks source link

docker version error in atomicapp run #182

Closed hhorak closed 8 years ago

hhorak commented 8 years ago

I'm not able to run the atomicapp (sources available at https://github.com/hhorak/guestbook-pgsql):

# docker build -t projectatomic/postgresql-centos7-atomicapp:latest .
Sending build context to Docker daemon 11.26 kB
Step 0 : FROM projectatomic/atomicapp:0.2.1
 ---> 044ea037afd9
Step 1 : LABEL io.projectatomic.nulecule.specversion "0.0.2" io.projectatomic.nulecule.providers "kubernetes,docker,openshift"
 ---> Using cache
 ---> 7448fe7fd9b3
Step 2 : ADD /Nulecule LICENSE /application-entity/
 ---> Using cache
 ---> dbf234f2e1b1
Step 3 : ADD /artifacts /application-entity/artifacts
 ---> Using cache
 ---> 9967fde4ac84
Successfully built 9967fde4ac84

# atomic run projectatomic/postgresql-centos7-atomicapp
docker run -it --rm  --privileged -v /home/hhorak/upstreams/github-hhorak/guestbook-pgsql/postgresql-centos7-atomicapp:/atomicapp -v /run:/run -v /:/host --net=host --name postgresql-centos7-atomicapp -e NAME=postgresql-centos7-atomicapp -e IMAGE=projectatomic/postgresql-centos7-atomicapp projectatomic/postgresql-centos7-atomicapp -v  run  projectatomic/postgresql-centos7-atomicapp
docker run -it --rm  --privileged -v /home/hhorak/upstreams/github-hhorak/guestbook-pgsql/postgresql-centos7-atomicapp:/atomicapp -v /run:/run -v /:/host --net=host --name postgresql-centos7-atomicapp -e NAME=postgresql-centos7-atomicapp -e IMAGE=projectatomic/postgresql-centos7-atomicapp projectatomic/postgresql-centos7-atomicapp -v  run  projectatomic/postgresql-centos7-atomicapp
2015-11-06 21:30:51,814 - atomicapp.plugin - DEBUG - Loading providers from /usr/lib/python2.7/site-packages/atomicapp-0.2.1-py2.7.egg/atomicapp/providers
2015-11-06 21:30:51,821 - atomicapp.nulecule.main - DEBUG - NuleculeManager init app_path: /host/var/lib/atomicapp/projectatomic-postgresql-centos7-atomicapp-7dc6142dbb5e
2015-11-06 21:30:51,821 - atomicapp.nulecule.main - DEBUG - NuleculeManager init    image: projectatomic/postgresql-centos7-atomicapp
2015-11-06 21:30:51,821 - atomicapp.nulecule.main - DEBUG - Request to unpack to projectatomic/postgresql-centos7-atomicapp to /host/var/lib/atomicapp/projectatomic-postgresql-centos7-atomicapp-7dc6142dbb5e
2015-11-06 21:30:51,821 - atomicapp.nulecule.base - INFO - Unpacking image: projectatomic/postgresql-centos7-atomicapp to /host/var/lib/atomicapp/projectatomic-postgresql-centos7-atomicapp-7dc6142dbb5e
2015-11-06 21:30:51,874 - atomicapp.cli.main - ERROR - Command '['/usr/bin/docker', 'version']' returned non-zero exit status 1
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/atomicapp-0.2.1-py2.7.egg/atomicapp/cli/main.py", line 71, in cli_run
    nm.run(**argdict)
  File "/usr/lib/python2.7/site-packages/atomicapp-0.2.1-py2.7.egg/atomicapp/nulecule/main.py", line 166, in run
    self.nulecule = self.unpack(dryrun=dryrun, config=self.answers)
  File "/usr/lib/python2.7/site-packages/atomicapp-0.2.1-py2.7.egg/atomicapp/nulecule/main.py", line 98, in unpack
    nodeps=nodeps, dryrun=dryrun, update=update)
  File "/usr/lib/python2.7/site-packages/atomicapp-0.2.1-py2.7.egg/atomicapp/nulecule/base.py", line 83, in unpack
    docker_handler = DockerHandler(dryrun=dryrun)
  File "/usr/lib/python2.7/site-packages/atomicapp-0.2.1-py2.7.egg/atomicapp/nulecule/container.py", line 33, in __init__
    raise e
CalledProcessError: Command '['/usr/bin/docker', 'version']' returned non-zero e
cdrage commented 8 years ago

Hmm, odd. I'm able to run it my end with atomic 1.6 and atomicapp 0.2.1 with the same example.

Can you do a whereis docker as well as a docker version for me?

hhorak commented 8 years ago
# rpm -q atomic
atomic-1.4-1.git9d724aa.fc23.x86_64

# docker run -ti --entrypoint=bash projectatomic/atomicapp:0.2.1 

$ whereis docker
docker: /usr/bin/docker /etc/docker /usr/libexec/docker

$ docker version
Client:
 Version:      1.8.2
 API version:  1.20
 Package Version: docker-1.8.2-7.el7.centos.x86_64
 Go version:   go1.4.2
 Git commit:   bb472f0/1.8.2
 Built:        
 OS/Arch:      linux/amd64
Get http:///var/run/docker.sock/v1.20/version: dial unix /var/run/docker.sock: no such file or directory.
* Are you trying to connect to a TLS-enabled daemon without TLS?
* Is your docker daemon up and running?

$ echo $?
1
dustymabe commented 8 years ago

Hi @hhorak. The appropriate place for this type of issue would be the https://github.com/projectatomic/atomicapp issue tracker.

So I see your issue as well. It happens to be a problem with the latest docker in Fedora 23. I just opened an issue to track it: https://bugzilla.redhat.com/show_bug.cgi?id=1278984

You can workaround this by removing docker and installing the older docker rpm:

dnf install https://kojipkgs.fedoraproject.org//packages/docker/1.8.2/7.gitcb216be.fc23/x86_64/docker-1.8.2-7.gitcb216be.fc23.x86_64.rpm https://kojipkgs.fedoraproject.org//packages/docker/1.8.2/7.gitcb216be.fc23/x86_64/docker-selinux-1.8.2-7.gitcb216be.fc23.x86_64.rpm
hhorak commented 8 years ago

Thanks, I'll follow the fedora report.