Circleci-builder error

I just grabbed circleci-builder to test my circle.yml locally, and the first time I run it I get this error:

$ circleci-builder build           

/usr/bin/docker-current: Error parsing reference: "circleci/picard@sha256:f991ae3fb584cf37224767def59d512600b2df57d9d83ac6e40c95ae5aa005f8:" is not a valid repository/tag.
See '/usr/bin/docker-current run --help'.

This is on Fedora 25, Docker version 1.12.6, build ae7d637/1.12.6. I’m not sure what other info will be useful, please let me know.

Looks like I had some garbage in my ~/.circleci/*_picard_digest files.

$ cat ~/.circleci/*
sha256:f991ae3fb584cf37224767def59d512600b2df57d9d83ac6e40c95ae5aa005f8: Pulling from docker.io/circleci/picard sha256:f991ae3fb584cf37224767def59d512600b2df57d9d83ac6e40c95ae5aa005f8
sha256:f991ae3fb584cf37224767def59d512600b2df57d9d83ac6e40c95ae5aa005f8: Pulling from docker.io/circleci/picard sha256:f991ae3fb584cf37224767def59d512600b2df57d9d83ac6e40c95ae5aa005f8

I stripped out everything from the : Pulling from, and the command worked. Looks like my version of docker is outputting extra stuff that the script isn’t handling.

And now I’m getting a different error, looks like inside the picard docker container:

+ docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock -v /home/rando/Code/kapost/cabbagepult:/home/rando/Code/kapost/cabbagepult -v /home/rando/.circleci/:/root/.circleci --workdir /home/rando/Code/kapost/cabbagepult circleci/picard@sha256:f991ae3fb584cf37224767def59d512600b2df57d9d83ac6e40c95ae5aa005f8 picard build
====>> 0. Spin up Environment
Build-agent version 0.0.2663-1632bcf (2017-03-06T14:46:33+0000)
Creating a dedicated VM
Error: Unexpected environment preparation error: VM creation is not supported

Step failed
Task failed
1 Like

Getting the same issue here :frowning:

The problem here is probably that your grep command by default uses colors so control characters are ending up in the digest string. For the time being, you can fix it by editing the circleci script to change the grep line in pull_latest_image to include --color=never so that (in version 0.0.2885-bff1cc5) it reads:

pull_latest_image() {
  latest_image=$(docker pull $PICARD_REPO | grep --color=never -o "sha256.*$")
  echo $latest_image > $LATEST_DIGEST_FILE
}

Then you probably need to delete ~/.circleci/current_picard_digest and ~/.circleci/latest_picard_digest and rerunning the command should work.

But hopefully the circle folks can fix this themselves and update the script soon :slight_smile:

Was getting the same Error parsing message. The message went away after installing docker following these instructions: https://docs.docker.com/engine/installation/linux/fedora/

Also on Fedora 25, but Docker version 17.03.1-ce, build c6d412e

I also made the grep change suggested by bendemboski.