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

[Bug]: Github action CI can run on incorrect version of a tagged image if that image tag exists in dockerhub #14797

Closed
1 task done
KevinMind opened this issue May 21, 2024 · 0 comments · Fixed by mozilla/addons-server#22260
Assignees

Comments

@KevinMind
Copy link
Contributor

KevinMind commented May 21, 2024

What happened?

When running make up docker compose up <ARGS> is executed. docker compose will create containers for images specified in the config, and attempt to pull latest versions of each image.

In our docker-run action we are specifying only an image verision e.g. test which is then mapped to a tage mozilla/addons-server:<version>

If the version specified is in dockerhub, it will pull that version. Docker compose may or may not build the image. Seems a little unclear on how that logic exactly works. There are configurations available to explicitly build in the run step, but we don't necessarily want that as we have already built the image in a previous workflow step.

What did you expect to happen?

We should always run CI using the exact image build resulting from the build-docker action step. We can achieve this be exposing and specifying the image by build digest instead of version. This is a much more precise specification and means even if docker pulls the image, that means the image you want actually exists in dockerhub and would behave the same as the local version.

Each build of a docker image creates a unique digest so we can rely on it.

Is there an existing issue for this?

  • I have searched the existing issues

┆Issue is synchronized with this Jira Task

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 a pull request may close this issue.

1 participant