Skip to content

Pull specific images using --docker-auto-pull option #4598

Closed

Description

@falsandtru

General summary/comments (optional)

Steps to reproduce

Expected

Pull a suitable image automatically.

Actual

$ stack --docker-auto-pull install
Error: No such object: fpco/stack-build:lts-13.8
Received ExitFailure 1 when running
Raw command: /snap/bin/docker inspect fpco/stack-build:lts-13.8
Standard output:

[]

Stack version

$ stack --version
Version 1.9.3, Git revision 40cf7b37526b86d1676da82167ea8758a854953b (6211 commits) x86_64 hpack-0.31.1

Method of installation

  • Official binary, downloaded from stackage.org or fpcomplete's package repository

Activity

  1. changed the title [-]--docker-auto-pull option doesn't pull specific images[/-] [+]Pull specific images using --docker-auto-pull option[/+] on Feb 20, 2019
  2. dbaynard commented on Mar 4, 2019

    @dbaynard
    Contributor

    Hi @falsandtru, thanks for raising this issue. What happens if you try it again, now? Please run with --verbose and paste the verbose log output here.

  3. falsandtru commented on Mar 4, 2019

    @falsandtru
    Author
    $ stack --docker-auto-pull --verbose install
    Version 1.9.3, Git revision 40cf7b37526b86d1676da82167ea8758a854953b (6211 commits) x86_64 hpack-0.31.1
    2019-03-05 04:08:10.688835: [debug] Checking for project config at: .../haskell-examples/stack.yaml
    2019-03-05 04:08:10.690173: [debug] Loading project config file stack.yaml
    2019-03-05 04:08:10.694951: [debug] Run process: /snap/bin/docker --version
    2019-03-05 04:08:10.966740: [debug] Process finished in 272ms: /snap/bin/docker --version
    2019-03-05 04:08:10.967757: [debug] Run process: /snap/bin/docker inspect fpco/stack-build:lts-13.9
    Error: No such object: fpco/stack-build:lts-13.9
    Received ExitFailure 1 when running
    Raw command: /snap/bin/docker inspect fpco/stack-build:lts-13.9
    Standard output:
    
    []
    
  4. falsandtru commented on Mar 4, 2019

    @falsandtru
    Author

    repro:

    1. clone https://github.com/falsandtru/haskell-examples
    2. run stack --docker --docker-auto-pull --verbose install
  5. dbaynard commented on Mar 4, 2019

    @dbaynard
    Contributor

    That docker inspect command is failing for me, on arch

  6. dbaynard commented on Mar 4, 2019

    @dbaynard
    Contributor

    Yet after a docker pull fpco/stack-build:lts-13.10 I can run docker inspect fpco/stack-build:lts-13.10 (though not any other version).

  7. dbaynard commented on Mar 4, 2019

    @dbaynard
    Contributor

    @borsboom Would you take a look, please. My docker is:

    Docker version 18.09.0-ce, build 4d60db472b
    

    Note also that docker inspect fpco/stack-build works.

    I wonder if the behaviour of inspect has changed?

  8. borsboom commented on Mar 5, 2019

    @borsboom
    Contributor

    @falsandtru I'm able to reproduce this locally.

    @dbaynard The behaviour you're describing is what I would expect. docker inspect is supposed to fail if you don't have the image locally. Stack tries running it to determine whether you have the image, and is then supposed to docker pull the image if that fails with a message that indicates the image isn't there. Something seems to be going wrong in that process, though.

  9. borsboom commented on Mar 6, 2019

    @borsboom
    Contributor

    It looks like, at some point, reading the standard output of docker inspect in the case where it exits with an error stopped working, so stack isn't detecting that the error is due to missing image rather than being some other general error.

  10. added a commit that references this issue on Mar 6, 2019
    ca728dd
  11. borsboom commented on Mar 6, 2019

    @borsboom
    Contributor

    PR with fix: #4604

  12. added a commit that references this issue on Mar 13, 2019
    eb27c62
  13. snoyberg commented on Mar 19, 2019

    @snoyberg
    Contributor

    This was fixed in #4604, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions