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

Getting Error #1

Open
MTRNord opened this issue Oct 4, 2016 · 11 comments
Open

Getting Error #1

MTRNord opened this issue Oct 4, 2016 · 11 comments

Comments

@MTRNord
Copy link

MTRNord commented Oct 4, 2016

When I run
./docker-stfd mtrnord/projectstreet_detection:latest sh -c "PYTHONPATH='/usr/lib/python2.7/dist-packages/' python face_detect.py abba.png haarcascade_frontalface_default.xml >> /root/shared/results/logs.txt"

I get

Reverse engineering Dockerfile...
Traceback (most recent call last):
  File "./docker-stfd", line 73, in <module>
    baseimage = next(l for l in dockerfile if l.startswith('FROM')).split()[1]
StopIteration

I run that inside an docker container (if that makes any difference)

@marius311
Copy link
Owner

Pulled your image and I'm able to reproduce this. What version of Docker are you using? Also, what does docker history mtrnord/projectstreet_detection show?

@MTRNord
Copy link
Author

MTRNord commented Oct 4, 2016

Docker Version:

docker version
Client:
 Version:      1.12.1
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   23cf638
 Built:        Thu Aug 18 05:02:53 2016
 OS/Arch:      linux/amd64

Server:
 Version:      1.12.1
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   23cf638
 Built:        Thu Aug 18 05:02:53 2016
 OS/Arch:      linux/amd64

History:

root@debian:/home/marcel/ProjectStreet# docker history mtrnord/projectstreet_detection
IMAGE               CREATED             CREATED BY                                      SIZE                COMMENT
c9646ac08b5e        15 hours ago        /bin/sh -c #(nop)  WORKDIR /FaceDetect          0 B                 
<missing>           15 hours ago        /bin/sh -c #(nop) COPY dir:e7c867c0c74e997e48   1.659 MB            
<missing>           15 hours ago        /bin/sh -c #(nop)  MAINTAINER MTRNord <info@n   0 B                 
<missing>           16 hours ago        /bin/sh -c apt-get update && apt-get install    307.8 MB            
<missing>           16 hours ago        /bin/sh -c #(nop)  MAINTAINER MTRNord <info@n   0 B                 
<missing>           10 days ago         /bin/sh -c #(nop)  CMD ["python2"]              0 B                 
<missing>           10 days ago         /bin/sh -c pip install --no-cache-dir virtual   7.898 MB            
<missing>           10 days ago         /bin/sh -c set -ex  && buildDeps='   tcl-dev    49.4 MB             
<missing>           10 days ago         /bin/sh -c #(nop)  ENV PYTHON_PIP_VERSION=8.1   0 B                 
<missing>           10 days ago         /bin/sh -c #(nop)  ENV PYTHON_VERSION=2.7.12    0 B                 
<missing>           10 days ago         /bin/sh -c #(nop)  ENV GPG_KEY=C01E1CAD5EA2C4   0 B                 
<missing>           10 days ago         /bin/sh -c apt-get update && apt-get install    7.749 MB            
<missing>           10 days ago         /bin/sh -c #(nop)  ENV LANG=C.UTF-8             0 B                 
<missing>           10 days ago         /bin/sh -c #(nop)  ENV PATH=/usr/local/bin:/u   0 B                 
<missing>           10 days ago         /bin/sh -c apt-get update && apt-get install    321.3 MB            
<missing>           10 days ago         /bin/sh -c apt-get update && apt-get install    122.6 MB            
<missing>           10 days ago         /bin/sh -c apt-get update && apt-get install    44.3 MB             
<missing>           10 days ago         /bin/sh -c #(nop)  CMD ["/bin/bash"]            0 B                 
<missing>           10 days ago         /bin/sh -c #(nop) ADD file:c6c23585ab140b0b32   123 MB    

@marius311
Copy link
Owner

Ok, all those <missing> I think means that you didn't build the image on the same system as you are trying to run stfd on it, is that correct? If so, can you try building the image locally then running stfd?

It may be necessary to have the build cache present for stfd to work and as of Docker 1.10 this doesn't get pulled anymore if you built the image on a different system (see also moby/moby#20316)

@MTRNord
Copy link
Author

MTRNord commented Oct 4, 2016

I will try that :) I did let it build on the dockerHub build system

@marius311
Copy link
Owner

Cool, if it fixes it let me know. I should add a big warning to the README.

@MTRNord
Copy link
Author

MTRNord commented Oct 4, 2016

Ok now I get some errors that are coming from centurylink/dockerfile-from-image (this one: CenturyLinkLabs/dockerfile-from-image#14 ) And also the fix there generates a new error :& But I think I should post that error in the issue tracker for centurylink/dockerfile-from-image

@marius311
Copy link
Owner

Ah yea, I was getting that too. The solution mentioned there worked for me. Either rebuild the CentryLinkLabs/dockerfile-from-image image yourself, or switch stfd to use dduvnjak/dockerfile-from-image instead here https://github.com/marius311/stfd/blob/master/docker-stfd#L70

@MTRNord
Copy link
Author

MTRNord commented Oct 4, 2016

Ok rebuilding only got me to another error. But I will try the other image :)

@MTRNord
Copy link
Author

MTRNord commented Oct 4, 2016

Both solutions give me than:

/usr/src/app/dockerfile-from-image.rb:33:in `block in <main>': undefined method `first' for nil:NilClass (NoMethodError)
    from /usr/src/app/dockerfile-from-image.rb:32:in `each'
    from /usr/src/app/dockerfile-from-image.rb:32:in `each_with_object'
    from /usr/src/app/dockerfile-from-image.rb:32:in `<main>'

@marius311
Copy link
Owner

Hm odd, I'm not sure the issue. If you share the Dockerfile I could try building the image myself and debugging further.

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

2 participants