-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Avoid updating Ubuntu Docker image in PR builds #15840
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -85,8 +85,12 @@ jobs: | |||||
| - uses: docker/setup-qemu-action@v2 | ||||||
| with: | ||||||
| platforms: arm64,ppc64le | ||||||
| - name: Set up Docker Buildx | ||||||
| uses: docker/setup-buildx-action@v2 | ||||||
| - name: Expose GitHub Runtime | ||||||
| uses: crazy-max/ghaction-github-runtime@v2 | ||||||
| - name: Test Docker Image | ||||||
| run: core/docker/build.sh | ||||||
| run: core/docker/build.sh -c | ||||||
|
Member
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.
Updates are not necessary (per Docker's philosophy, updates to the base image should be part of base image lifecycle), but we install new stuff too.
We already have some retries Lines 29 to 30 in 257c2a5
are these not sufficient? what can we do to make them sufficient? This change may get CI working, but we cannot rely on that for automated releases (once we have them), so would be nice to have some more self-contained solution
Member
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. BTW this means CI won't see any updates to |
||||||
| - name: Remove Trino from local Maven repo to avoid caching it | ||||||
| # Avoid caching artifacts built in this job, cache should only include dependencies | ||||||
| if: steps.cache.outputs.cache-hit != 'true' | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
| FROM eclipse-temurin:17-jdk AS builder | ||
|
|
||
| RUN \ | ||
| set -xeu && \ | ||
| echo 'Acquire::Retries "3";' > /etc/apt/apt.conf.d/80-retries && \ | ||
| echo 'Acquire::http::Timeout "15";' > /etc/apt/apt.conf.d/80-timeouts && \ | ||
| apt-get update -q && \ | ||
| apt-get install -y -q git gcc make && \ | ||
| git clone https://github.com/airlift/jvmkill /tmp/jvmkill && \ | ||
| make -C /tmp/jvmkill | ||
|
|
||
| FROM eclipse-temurin:17-jdk | ||
|
|
||
| RUN \ | ||
| set -xeu && \ | ||
| echo 'Acquire::Retries "3";' > /etc/apt/apt.conf.d/80-retries && \ | ||
| echo 'Acquire::http::Timeout "15";' > /etc/apt/apt.conf.d/80-timeouts && \ | ||
| apt-get update -q && \ | ||
| apt-get install -y -q less python3 curl && \ | ||
| rm -rf /var/lib/apt/lists/* && \ | ||
| update-alternatives --install /usr/bin/python python /usr/bin/python3 1 && \ | ||
| groupadd trino --gid 1000 && \ | ||
| useradd trino --uid 1000 --gid 1000 --create-home && \ | ||
| mkdir -p /usr/lib/trino /data/trino && \ | ||
| chown -R "trino:trino" /usr/lib/trino /data/trino | ||
|
|
||
| COPY --chown=trino:trino --from=builder /tmp/jvmkill/libjvmkill.so /usr/lib/trino/bin/libjvmkill.so |
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 am not well-versed in buildx.
if you want me to continue the review of this PR, I would recommend splitting this out to a follow-up