Skip to content

Conversation

qmonnet
Copy link
Member

@qmonnet qmonnet commented May 19, 2022

The first step for building the cilium/docs-builder image, used for building Cilium's documentation, consists in pre-pulling the image with Docker (to avoid failures from buildkit). The relevant command is formed by parsing the name of the Alpine image from the Dockerfile.

On some setups, for example on Ubuntu running in Windows WSL with the Cilium repository mounted from a Windows partition, the Dockerfile may contain DOS-style line breaks (CR-LF). The result from grep being piped to xargs and passed to docker pull, we get an error because Docker cannot recognise a valid reference with this \r character at the end of the string. Let's remove any carriage return characters before feeding the line to xargs.

The first step for building the cilium/docs-builder image, used for
building Cilium's documentation, consists in pre-pulling the image with
Docker (to avoid failures from buildkit). The relevant command is formed
by parsing the name of the Alpine image from the Dockerfile.

On some setups, for example on Ubuntu running in Windows WSL with the
Cilium repository mounted from a Windows partition, the Dockerfile may
contain DOS-style line breaks (CR-LF). The result from "grep" being
piped to xargs and passed to "docker pull", we get an error because
Docker cannot recognise a valid reference with this '\r' character at
the end of the string. Let's remove any carriage return characters
before feeding the line to xargs.

Reported-by: Yoyo Wu <yoyo19980720@163.com>
Signed-off-by: Quentin Monnet <quentin@isovalent.com>
@qmonnet qmonnet added area/documentation Impacts the documentation, including textual changes, sphinx, or other doc generation code. release-note/misc This PR makes changes that have no direct user impact. needs-backport/1.10 labels May 19, 2022
@qmonnet qmonnet requested a review from a team as a code owner May 19, 2022 22:58
@qmonnet qmonnet requested a review from joestringer May 19, 2022 22:58
@joestringer joestringer merged commit f17a17a into cilium:master May 20, 2022
@qmonnet qmonnet deleted the pr/doc-windows-crlf branch May 20, 2022 09:02
@tklauser tklauser added backport-done/1.11 The backport for Cilium 1.11.x for this PR is done. and removed backport-pending/1.11 labels Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation Impacts the documentation, including textual changes, sphinx, or other doc generation code. backport-done/1.11 The backport for Cilium 1.11.x for this PR is done. release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants