-
Notifications
You must be signed in to change notification settings - Fork 821
SOLR-17353 Bump gosu binary to v1.19 in docker images #4273
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
Open
janhoy
wants to merge
3
commits into
apache:main
Choose a base branch
from
janhoy:SOLR-17353-docker-gosu-upgrade
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+40
−7
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| title: Bump gosu binary to v1.19 in docker images | ||
| type: dependency_update | ||
| authors: | ||
| - name: Jan Høydahl | ||
| url: https://home.apache.org/phonebook.html?uid=janhoy | ||
| links: | ||
| - name: SOLR-17353 | ||
| url: https://issues.apache.org/jira/browse/SOLR-17353 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,6 +48,26 @@ ENV SOLR_USER="solr" \ | |
| SOLR_HOST_BIND="0.0.0.0" \ | ||
| SOLR_ZOOKEEPER_EMBEDDED_HOST="0.0.0.0" | ||
|
|
||
| ARG GOSU_VERSION=1.19 | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| RUN set -eux; \ | ||
| apt-get update; \ | ||
| apt-get -y --no-install-recommends install curl acl lsof procps wget netcat-openbsd tini jattach gpg gnupg dirmngr; \ | ||
| rm -rf /var/lib/apt/lists/*; \ | ||
| dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \ | ||
| wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-${dpkgArch}"; \ | ||
| wget -O /tmp/gosu.asc "https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-${dpkgArch}.asc"; \ | ||
| export GNUPGHOME="$(mktemp -d)"; \ | ||
janhoy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| chmod 700 "$GNUPGHOME"; \ | ||
| gpg --batch --keyserver hkps://keys.openpgp.org \ | ||
| --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; \ | ||
| gpg --batch --verify /tmp/gosu.asc /usr/local/bin/gosu; \ | ||
| gpgconf --kill gpg-agent; \ | ||
| rm -rf "$GNUPGHOME" /tmp/gosu.asc; \ | ||
| chmod +x /usr/local/bin/gosu; \ | ||
| gosu --version; \ | ||
| gosu nobody true; \ | ||
| apt-get -y remove gpg dirmngr && apt-get -y autoremove | ||
|
|
||
| RUN set -ex; \ | ||
| groupadd -r --gid "$SOLR_GID" "$SOLR_GROUP"; \ | ||
| useradd -r --uid "$SOLR_UID" --gid "$SOLR_GID" "$SOLR_USER" | ||
|
|
@@ -67,11 +87,6 @@ RUN set -ex; \ | |
| mkdir -p -m0770 /var/solr; \ | ||
| chown -R "$SOLR_USER:0" /var/solr; | ||
|
|
||
| RUN set -ex; \ | ||
| apt-get update; \ | ||
| apt-get -y --no-install-recommends install curl acl lsof procps wget netcat-openbsd gosu tini jattach; \ | ||
| rm -rf /var/lib/apt/lists/*; | ||
|
|
||
| VOLUME /var/solr | ||
| EXPOSE 8983 | ||
| WORKDIR /opt/solr | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not tested, a bit hard to dry-run these things, but is an attractive way to monitor version of a binary that would else fall between the cracks. The snippet is created by AI and I ran it through another AI to validate syntax. I suggest we do manual review and then test that it actaully works "live" post merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to our friend claude, this can be simplified by adding the below comment above the
ARGin the dockerfile:Then you only have to include the below configuration to include the custom file in the scans:
{ ... "dockerfile": { "fileMatch": ["(^|/)Dockerfile\\.body\\.template$"] } }There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also believe there is a simple way for running renovate on local repository through the local platform feature. I will see if I can prepare something for testing purposes and see if my above proposal works as expected. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could confirm your solution with the following command (renovate was installed via
npm install -g renovate):I downgraded to 1.17 to see if renovate picks it up, and the output confirmed it:
The solution with the comment can still be used though, so that we can generalize the matching to other packages as well (more future-proof). This can be done by changing the matchStrings with
and add this comment above the
ARG:renovate will then pick the datasource and depName from the comment, rather than the renovate.json file (more flexible).