Skip to content
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

Remove --pull from images using kanister-tools as base #2727

Merged
merged 1 commit into from
Mar 7, 2024

Conversation

pavannd1
Copy link
Contributor

@pavannd1 pavannd1 commented Mar 7, 2024

Change Overview

Using --pull flag when building docker images that try to pull kanister-tools:{RELEASE_TAG} from upstream fails. The image doesn't exist yet since the release job first builds all the images and then pushes them to ghcr.

Example failure:

[2024-03-07T02:43:24.758Z]     • building docker image                          image=ghcr.io/kanisterio/mongodb:0.106.0
[2024-03-07T02:43:24.778Z]     • running                                        args=[. -t ghcr.io/kanisterio/mongodb:0.106.0 --pull --build-arg=TOOLS_IMAGE=ghcr.io/kanisterio/kanister-tools:0.106.0] cmd=[docker build] cwd=dist/goreleaserdocker4266236303
[2024-03-07T02:43:24.835Z]     • #0 building with "default" instance using docker driver cmd=[docker build] cwd=dist/goreleaserdocker4266236303
[2024-03-07T02:43:24.835Z]     •                                                cmd=[docker build] cwd=dist/goreleaserdocker4266236303
[2024-03-07T02:43:24.835Z]     • #1 [internal] load build definition from Dockerfile cmd=[docker build] cwd=dist/goreleaserdocker4266236303
[2024-03-07T02:43:24.835Z]     • #1 transferring dockerfile: 392B done          cmd=[docker build] cwd=dist/goreleaserdocker4266236303
[2024-03-07T02:43:24.835Z]     • #1 DONE 0.0s                                   cmd=[docker build] cwd=dist/goreleaserdocker4266236303
[2024-03-07T02:43:24.835Z]     •                                                cmd=[docker build] cwd=dist/goreleaserdocker4266236303
[2024-03-07T02:43:24.835Z]     • #2 [internal] load .dockerignore               cmd=[docker build] cwd=dist/goreleaserdocker4266236303
[2024-03-07T02:43:24.835Z]     • #2 transferring context: 2B done               cmd=[docker build] cwd=dist/goreleaserdocker4266236303
[2024-03-07T02:43:24.835Z]     • #2 DONE 0.0s                                   cmd=[docker build] cwd=dist/goreleaserdocker4266236303
[2024-03-07T02:43:24.835Z]     •                                                cmd=[docker build] cwd=dist/goreleaserdocker4266236303
[2024-03-07T02:43:24.835Z]     • #3 [internal] load metadata for ghcr.io/kanisterio/kanister-tools:0.106.0 cmd=[docker build] cwd=dist/goreleaserdocker4266236303
[2024-03-07T02:43:24.858Z]     • #3 ERROR: ghcr.io/kanisterio/kanister-tools:0.106.0: not found cmd=[docker build] cwd=dist/goreleaserdocker4266236303
[2024-03-07T02:43:24.858Z]     •                                                cmd=[docker build] cwd=dist/goreleaserdocker4266236303
[2024-03-07T02:43:24.858Z]     • #4 [internal] load metadata for docker.io/bitnami/mongodb:7.0-debian-12 cmd=[docker build] cwd=dist/goreleaserdocker4266236303
[2024-03-07T02:43:24.858Z]     • #4 CANCELED                                    cmd=[docker build] cwd=dist/goreleaserdocker4266236303
[2024-03-07T02:43:24.858Z]     • ------                                         cmd=[docker build] cwd=dist/goreleaserdocker4266236303
[2024-03-07T02:43:24.858Z]     •  > [internal] load metadata for ghcr.io/kanisterio/kanister-tools:0.106.0: cmd=[docker build] cwd=dist/goreleaserdocker4266236303
[2024-03-07T02:43:24.858Z]     • ------                                         cmd=[docker build] cwd=dist/goreleaserdocker4266236303
[2024-03-07T02:43:24.858Z]     • Dockerfile:4                                   cmd=[docker build] cwd=dist/goreleaserdocker4266236303
[2024-03-07T02:43:24.858Z]     • --------------------                           cmd=[docker build] cwd=dist/goreleaserdocker4266236303
[2024-03-07T02:43:24.859Z]     •    2 |     # Tools are not up to date in debian repos cmd=[docker build] cwd=dist/goreleaserdocker4266236303
[2024-03-07T02:43:24.859Z]     •    3 |     ARG TOOLS_IMAGE                     cmd=[docker build] cwd=dist/goreleaserdocker4266236303
[2024-03-07T02:43:24.859Z]     •    4 | >>> FROM ${TOOLS_IMAGE} AS TOOLS_IMAGE  cmd=[docker build] cwd=dist/goreleaserdocker4266236303
[2024-03-07T02:43:24.859Z]     •    5 |                                         cmd=[docker build] cwd=dist/goreleaserdocker4266236303
[2024-03-07T02:43:24.862Z]     •    6 |     FROM bitnami/mongodb:7.0-debian-12  cmd=[docker build] cwd=dist/goreleaserdocker4266236303
[2024-03-07T02:43:24.862Z]     • --------------------                           cmd=[docker build] cwd=dist/goreleaserdocker4266236303
[2024-03-07T02:43:24.862Z]     • ERROR: failed to solve: ghcr.io/kanisterio/kanister-tools:0.106.0: ghcr.io/kanisterio/kanister-tools:0.106.0: not found cmd=[docker build] cwd=dist/goreleaserdocker4266236303

Pull request type

Please check the type of change your PR introduces:

  • 🚧 Work in Progress
  • 🌈 Refactoring (no functional changes, no api changes)
  • 🐹 Trivial/Minor
  • 🐛 Bugfix
  • 🌻 Feature
  • 🗺️ Documentation
  • 🤖 Test

Issues

  • fixes #issue-number

Test Plan

  • 💪 Manual
  • ⚡ Unit test
  • 💚 E2E

@pavannd1 pavannd1 added the kueue label Mar 7, 2024
@mergify mergify bot merged commit 833062e into master Mar 7, 2024
15 checks passed
@mergify mergify bot deleted the fix-docker-build-in-release-job branch March 7, 2024 03:15
hairyhum added a commit that referenced this pull request Mar 8, 2024
…ages

Follow up to #2711 and #2727

Github keeps some image cache in the GHA runners which keeps around
base containers with vulnerabilities.

We can't use --pull because we use local-built tools image.
hairyhum added a commit that referenced this pull request Mar 11, 2024
…ages

Follow up to #2711 and #2727

Github keeps some image cache in the GHA runners which keeps around
base containers with vulnerabilities.

We can't use --pull because we use local-built tools image.
hairyhum added a commit that referenced this pull request Mar 12, 2024
…ages (#2734)

Follow up to #2711 and #2727

Github keeps some image cache in the GHA runners which keeps around
base containers with vulnerabilities.

We can't use --pull because we use local-built tools image.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants