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

Dockerfile: add -f to curl #2264

Merged
merged 1 commit into from
Mar 23, 2020
Merged

Conversation

kolyshkin
Copy link
Contributor

When github is giving HTTP 404 (or other error), it still sends some
document (to be viewed in a browser), but we have tar on the other end
of the pipe, so the end result is like this:

Step 13/13 : RUN . tests/integration/multi-arch.bash && curl -o- -sSL get_busybox | tar xfJC - ${ROOTFS}
4872 ---> Running in ad84646a69f3
4873xz: (stdin): File format not recognized
4874tar: Child returned status 1
4875tar: Error is not recoverable: exiting now
4876The command '/bin/sh -c . tests/integration/multi-arch.bash && curl -o- -sSL get_busybox | tar xfJC - ${ROOTFS}' returned a non-zero code: 2

Add -f switch to curl, so it will display an HTTP error and exit:

curl: (22) The requested URL returned error: 404 Not Found
xz: (stdin): File format not recognized
tar: Child returned status 1
tar: Error is not recoverable: exiting now

While at it, also

  • remove -v from criu untar (too much output)
  • remove -o - from curl (it does the same by default)

@thaJeztah PTAL

When github is giving HTTP 404 (or other error), it still sends some
document (to be viewed in a browser), but we have tar on the other end
of the pipe, so the end result is like this:

> Step 13/13 : RUN . tests/integration/multi-arch.bash     && curl -o- -sSL `get_busybox` | tar xfJC - ${ROOTFS}
> 4872 ---> Running in ad84646a69f3
> 4873xz: (stdin): File format not recognized
> 4874tar: Child returned status 1
> 4875tar: Error is not recoverable: exiting now
> 4876The command '/bin/sh -c . tests/integration/multi-arch.bash     && curl -o- -sSL `get_busybox` | tar xfJC - ${ROOTFS}' returned a non-zero code: 2

Add -f switch to curl, so it will display an HTTP error and exit:

> curl: (22) The requested URL returned error: 404 Not Found
> xz: (stdin): File format not recognized
> tar: Child returned status 1
> tar: Error is not recoverable: exiting now

While at it, also
 * remove -v from criu untar (too much output)
 * remove -o - from curl (it does the same by default)

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@AkihiroSuda
Copy link
Member

AkihiroSuda commented Mar 21, 2020

LGTM

Approved with PullApprove

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM; want me to include this into #2234 ?

@kolyshkin
Copy link
Contributor Author

LGTM; want me to include this into #2234?

Yes please

@crosbymichael
Copy link
Member

crosbymichael commented Mar 23, 2020

LGTM

Approved with PullApprove

@crosbymichael crosbymichael merged commit 1797622 into opencontainers:master Mar 23, 2020
@kolyshkin kolyshkin deleted the dockerfile branch March 30, 2020 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants