Skip to content

Fix devcontainer ripgrep#3192

Open
JoukoVirtanen wants to merge 2 commits intorc-claude-devfrom
jv-fix-devcontainer-ripgrep
Open

Fix devcontainer ripgrep#3192
JoukoVirtanen wants to merge 2 commits intorc-claude-devfrom
jv-fix-devcontainer-ripgrep

Conversation

@JoukoVirtanen
Copy link
Copy Markdown
Contributor

@JoukoVirtanen JoukoVirtanen commented Apr 5, 2026

Description

I ran

$ docker build --platform linux/amd64 -t collector-dev:test -f .devcontainer/Dockerfile .devcontainer/

in rc-claude-dev and got the following error

[+] Building 39.7s (7/15)                                                                                                                                                      docker:default
 => [internal] load build definition from Dockerfile                                                                                                                                     0.0s
 => => transferring dockerfile: 3.32kB                                                                                                                                                   0.0s
 => [internal] load metadata for quay.io/stackrox-io/collector-builder:master                                                                                                            0.0s
 => [internal] load .dockerignore                                                                                                                                                        0.0s
 => => transferring context: 2B                                                                                                                                                          0.0s
 => [internal] load build context                                                                                                                                                        0.0s
 => => transferring context: 3.88kB                                                                                                                                                      0.0s
 => [ 1/11] FROM quay.io/stackrox-io/collector-builder:master                                                                                                                            0.1s
 => [ 2/11] RUN dnf install -y         bubblewrap         clang-tools-extra         jq         socat         zsh         procps-ng         sudo         python3-pip         iptables    36.3s
 => ERROR [ 3/11] RUN ARCH=$(uname -m)     && GOARCH=$([ "$ARCH" = "aarch64" ] && echo "arm64" || echo "amd64")     && curl -fsSL "https://go.dev/dl/go1.23.6.linux-${GOARCH}.tar.gz" |  3.2s 
------                                                                                                                                                                                        
 > [ 3/11] RUN ARCH=$(uname -m)     && GOARCH=$([ "$ARCH" = "aarch64" ] && echo "arm64" || echo "amd64")     && curl -fsSL "https://go.dev/dl/go1.23.6.linux-${GOARCH}.tar.gz" | tar -C /usr/local -xzf -     && curl -fsSL "https://github.com/BurntSushi/ripgrep/releases/download/14.1.1/ripgrep-14.1.1-${ARCH}-unknown-linux-gnu.tar.gz"        | tar -xzf - --strip-components=1 -C /usr/local/bin "ripgrep-14.1.1-${ARCH}-unknown-linux-gnu/rg"     && curl -fsSL "https://github.com/sharkdp/fd/releases/download/v10.2.0/fd-v10.2.0-${ARCH}-unknown-linux-gnu.tar.gz"        | tar -xzf - --strip-components=1 -C /usr/local/bin "fd-v10.2.0-${ARCH}-unknown-linux-gnu/fd":                                                                                                     
3.129 curl: (22) The requested URL returned error: 404
3.131 
3.131 gzip: stdin: unexpected end of file
3.131 tar: Child returned status 1
3.131 tar: Error is not recoverable: exiting now
------
Dockerfile:30
--------------------
  29 |     # Go uses arm64/amd64, ripgrep/fd use aarch64/x86_64
  30 | >>> RUN ARCH=$(uname -m) \
  31 | >>>     && GOARCH=$([ "$ARCH" = "aarch64" ] && echo "arm64" || echo "amd64") \
  32 | >>>     # Install Go
  33 | >>>     && curl -fsSL "https://go.dev/dl/go1.23.6.linux-${GOARCH}.tar.gz" | tar -C /usr/local -xzf - \
  34 | >>>     # Install ripgrep
  35 | >>>     && curl -fsSL "https://github.com/BurntSushi/ripgrep/releases/download/14.1.1/ripgrep-14.1.1-${ARCH}-unknown-linux-gnu.tar.gz" \
  36 | >>>        | tar -xzf - --strip-components=1 -C /usr/local/bin "ripgrep-14.1.1-${ARCH}-unknown-linux-gnu/rg" \
  37 | >>>     # Install fd
  38 | >>>     && curl -fsSL "https://github.com/sharkdp/fd/releases/download/v10.2.0/fd-v10.2.0-${ARCH}-unknown-linux-gnu.tar.gz" \
  39 | >>>        | tar -xzf - --strip-components=1 -C /usr/local/bin "fd-v10.2.0-${ARCH}-unknown-linux-gnu/fd"
  40 |     
--------------------
ERROR: failed to build: failed to solve: process "/bin/sh -c ARCH=$(uname -m)     && GOARCH=$([ \"$ARCH\" = \"aarch64\" ] && echo \"arm64\" || echo \"amd64\")     && curl -fsSL \"https://go.dev/dl/go1.23.6.linux-${GOARCH}.tar.gz\" | tar -C /usr/local -xzf -     && curl -fsSL \"https://github.com/BurntSushi/ripgrep/releases/download/14.1.1/ripgrep-14.1.1-${ARCH}-unknown-linux-gnu.tar.gz\"        | tar -xzf - --strip-components=1 -C /usr/local/bin \"ripgrep-14.1.1-${ARCH}-unknown-linux-gnu/rg\"     && curl -fsSL \"https://github.com/sharkdp/fd/releases/download/v10.2.0/fd-v10.2.0-${ARCH}-unknown-linux-gnu.tar.gz\"        | tar -xzf - --strip-components=1 -C /usr/local/bin \"fd-v10.2.0-${ARCH}-unknown-linux-gnu/fd\"" did not complete successfully: exit code: 2

The changes here fixed the error. The error was that ripgrep-14.1.1-.x86_64-unknown-linux-gnu was not available. However, ripgrep-14.1.1-.x86_64-unknown-linux-musl is available.

Checklist

  • Investigated and inspected CI test results
  • Updated documentation accordingly

Automated testing

  • Added unit tests
  • Added integration tests
  • Added regression tests

If any of these don't apply, please comment below.

Testing Performed

TODO(replace-me)
Use this space to explain how you tested your PR, or, if you didn't test it, why you did not do so. (Valid reasons include "CI is sufficient" or "No testable changes")
In addition to reviewing your code, reviewers must also review your testing instructions, and make sure they are sufficient.

For more details, ref the Confluence page about this section.

@JoukoVirtanen JoukoVirtanen requested a review from a team as a code owner April 5, 2026 02:00
@JoukoVirtanen JoukoVirtanen changed the title Jv fix devcontainer ripgrep Fix devcontainer ripgrep Apr 5, 2026
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 27.38%. Comparing base (c62aa5b) to head (987d7e0).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@              Coverage Diff               @@
##           rc-claude-dev    #3192   +/-   ##
==============================================
  Coverage          27.38%   27.38%           
==============================================
  Files                 95       95           
  Lines               5427     5427           
  Branches            2548     2548           
==============================================
  Hits                1486     1486           
  Misses              3214     3214           
  Partials             727      727           
Flag Coverage Δ
collector-unit-tests 27.38% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 5, 2026

/retest collector-on-push

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

Successfully merging this pull request may close these issues.

2 participants