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

docker-build breaks with docker 18.06.1 #229

Closed
hellais opened this issue Oct 12, 2018 · 4 comments
Closed

docker-build breaks with docker 18.06.1 #229

hellais opened this issue Oct 12, 2018 · 4 comments

Comments

@hellais
Copy link
Member

hellais commented Oct 12, 2018

On macOS with the following docker version:

Docker version 18.06.1-ce, build e68fc7a

When I run the docker-build script from inside of the directory of ooni/api I get the following error:

Error response from daemon: Syntax error - can't find = in "relationship('Label',". Must be of the form: name=value

I believe this has something to do with the fact that it is interpreting the git archive --format=tar into STDIN in a different way than how it used to interpret it.

Doing some basic searching on the internet it seems like we are not the only one experiencing this problem:

moby/moby#28587
moby/moby#29005
moby/moby#31697

@darkk
Copy link
Contributor

darkk commented Oct 17, 2018

Same issue on Linux with Docker version 18.06.1-ce, build e68fc7a, so it's not mac-specific.

@darkk
Copy link
Contributor

darkk commented Oct 17, 2018

That's clearly a regression as there was an intention to write a test-case for raw tar file some time ago — moby/moby#5715 (comment)

@hellais
Copy link
Member Author

hellais commented Oct 17, 2018

That's clearly a regression as there was an intention to write a test-case for raw tar file some time ago

Yes I agree, yet if you look at the discussion in the tickets I linked above, it seems like they made some pretty heavy changes to their parser, which is going to make supporting this harder.

BTW while looking at this it seems like inline comments, of the style:

RUN echo "command 1"
    && echo "command 2"
    # This comment breaks the new parser
    && echo "command 3"

Will also break. I haven't run into Dockerfile by us that have this, but I mention it here as it also seems to be a common pitfall.

@darkk
Copy link
Contributor

darkk commented Oct 18, 2018

Yes, having a comment within multi-line shell statement always looked like a questionable practice to me. I don't remember if it breaks any of our Dockerfiles or not, but this specific issue is caused by bad magic: uncompressed tar file is no longer "expected" stdin input for docker-build, but compressed tar (--format=tgz) is. So, workaround is trivial :)

@darkk darkk closed this as completed in f3e6f5c Oct 20, 2018
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