Skip to content

Conversation

@lorenabalan
Copy link
Contributor

@lorenabalan lorenabalan commented Jul 22, 2025

Description

elastic-renovate recently bumped the sha for the base image of our wolfi docker image. Unfortunately that broke our image as apk has been stripped out, which requires a re-work of the Dockerfile. The regression slipped through the cracks because on CI we only build the simple Docker image (Dockerfile), not the wolfi one. Wolfi is only built at release time.

I tried a few different things to fix the new image, however it seems like it's a non-trivial amount of effort at this time, so we just reverted the bump.
For future reference, I tried using wget instead of curl, as well as installing curl and make via another build stage (from an alpine image, and copy it into the next stages). For example kept running into issues making make work

 > [builder 14/15] RUN make clean install:
0.116 rm -rf Jars.lock vendor/jars
0.158 script/environment
0.158 make: script/environment: No such file or directory
0.158 make: *** [Makefile:13: install] Error 127

Checklists

Pre-Review Checklist

  • This PR does NOT contain credentials of any kind, such as API keys or username/passwords (double check crawler.yml.example and elasticsearch.yml.example)
  • This PR has a meaningful title
  • This PR links to all relevant GitHub issues that it fixes or partially addresses
    • If there is no GitHub issue, please create it. Each PR should have a link to an issue
  • this PR has a thorough description
  • Covered the changes with automated tests
  • Tested the changes locally
  • Added a label for each target release version (example: v0.1.0)
  • Considered corresponding documentation changes
  • Contributed any configuration settings changes to the configuration reference
  • Ran make notice if any dependencies have been added

Related Pull Requests

#349

@lorenabalan lorenabalan marked this pull request as ready for review July 22, 2025 14:12
@lorenabalan lorenabalan requested a review from a team as a code owner July 22, 2025 14:12
Copy link
Contributor

@mattnowzari mattnowzari left a comment

Choose a reason for hiding this comment

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

LGTM 🚢 Thank you for adding this, this is excellent!

@lorenabalan lorenabalan merged commit 8b63c7b into main Jul 22, 2025
2 checks passed
@lorenabalan lorenabalan deleted the lb/fix/wolfi-image branch July 22, 2025 14:24
@github-actions
Copy link

github-actions bot commented Oct 6, 2025

💔 Failed to create backport PR(s)

The backport operation could not be completed due to the following error:
There are no branches to backport to. Aborting.

The backport PRs will be merged automatically after passing CI.

To backport manually run:
backport --pr 357 --autoMerge --autoMergeMethod squash

mattnowzari pushed a commit that referenced this pull request Oct 6, 2025
### Description

`elastic-renovate` recently
[bumped](#349) the sha for the
base image of our wolfi docker image. Unfortunately that broke our image
as `apk` has been stripped out, which requires a re-work of the
Dockerfile. The regression slipped through the cracks because on CI we
only build the simple Docker image (`Dockerfile`), not the wolfi one.
Wolfi is only built at release time.

I tried a few different things to fix the new image, however it seems
like it's a non-trivial amount of effort at this time, so we just
[reverted the bump](#358).
For future reference, I tried using `wget` instead of `curl`, as well as
installing `curl` and `make` via another build stage (from an `alpine`
image, and copy it into the next stages). For example kept running into
issues making `make` work

```
 > [builder 14/15] RUN make clean install:
0.116 rm -rf Jars.lock vendor/jars
0.158 script/environment
0.158 make: script/environment: No such file or directory
0.158 make: *** [Makefile:13: install] Error 127
```

### Checklists

<!--You can remove unrelated items from checklists below and/or add new
items that may help during the review.-->

#### Pre-Review Checklist
- [ ] This PR does NOT contain credentials of any kind, such as API keys
or username/passwords (double check `crawler.yml.example` and
`elasticsearch.yml.example`)
- [ ] This PR has a meaningful title
- [ ] This PR links to all relevant GitHub issues that it fixes or
partially addresses
- If there is no GitHub issue, please create it. Each PR should have a
link to an issue
- [ ] this PR has a thorough description
- [ ] Covered the changes with automated tests
- [ ] Tested the changes locally
- [ ] Added a label for each target release version (example: `v0.1.0`)
- [ ] Considered corresponding documentation changes
- [ ] Contributed any configuration settings changes to the
configuration reference
- [ ] Ran `make notice` if any dependencies have been added

### Related Pull Requests

<!--List any relevant PRs here or remove the section if this is a
standalone PR.

[*
https://github.com/elastic/.../pull/123-->](https://github.com/elastic/crawler/pull/349)

(cherry picked from commit 8b63c7b)
mattnowzari pushed a commit that referenced this pull request Oct 6, 2025
### Description

`elastic-renovate` recently
[bumped](#349) the sha for the
base image of our wolfi docker image. Unfortunately that broke our image
as `apk` has been stripped out, which requires a re-work of the
Dockerfile. The regression slipped through the cracks because on CI we
only build the simple Docker image (`Dockerfile`), not the wolfi one.
Wolfi is only built at release time.

I tried a few different things to fix the new image, however it seems
like it's a non-trivial amount of effort at this time, so we just
[reverted the bump](#358).
For future reference, I tried using `wget` instead of `curl`, as well as
installing `curl` and `make` via another build stage (from an `alpine`
image, and copy it into the next stages). For example kept running into
issues making `make` work

```
 > [builder 14/15] RUN make clean install:
0.116 rm -rf Jars.lock vendor/jars
0.158 script/environment
0.158 make: script/environment: No such file or directory
0.158 make: *** [Makefile:13: install] Error 127
```

### Checklists

<!--You can remove unrelated items from checklists below and/or add new
items that may help during the review.-->

#### Pre-Review Checklist
- [ ] This PR does NOT contain credentials of any kind, such as API keys
or username/passwords (double check `crawler.yml.example` and
`elasticsearch.yml.example`)
- [ ] This PR has a meaningful title
- [ ] This PR links to all relevant GitHub issues that it fixes or
partially addresses
- If there is no GitHub issue, please create it. Each PR should have a
link to an issue
- [ ] this PR has a thorough description
- [ ] Covered the changes with automated tests
- [ ] Tested the changes locally
- [ ] Added a label for each target release version (example: `v0.1.0`)
- [ ] Considered corresponding documentation changes
- [ ] Contributed any configuration settings changes to the
configuration reference
- [ ] Ran `make notice` if any dependencies have been added

### Related Pull Requests

<!--List any relevant PRs here or remove the section if this is a
standalone PR.

[*
https://github.com/elastic/.../pull/123-->](https://github.com/elastic/crawler/pull/349)

(cherry picked from commit 8b63c7b)
@mattnowzari
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
0.4
0.3

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

mattnowzari added a commit that referenced this pull request Oct 6, 2025
# Backport

This will backport the following commits from `main` to `0.4`:
- [Build the wolfi image on CI
(#357)](#357)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

Co-authored-by: Lorena Bălan <lorena.balan@elastic.co>
mattnowzari added a commit that referenced this pull request Oct 7, 2025
# Backport

This will backport the following commits from `main` to `0.3`:
- [Build the wolfi image on CI
(#357)](#357)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

Co-authored-by: Lorena Bălan <lorena.balan@elastic.co>
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.

3 participants