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

Prefer UBI and go download over library/golang #1173

Merged
merged 3 commits into from
Oct 14, 2024

Conversation

bdunne
Copy link
Member

@bdunne bdunne commented Oct 1, 2024

  • speed up build since there is less to download
  • reduce external dependencies
  • build and run on the same base image
REPOSITORY                TAG  IMAGE ID     CREATED         SIZE
my                        test 422e3c099772 10 seconds ago  366 MB
docker.io/library/golang  1.23 361d8b5c9aa5 3 weeks ago     862 MB

manageiq-operator/Dockerfile Outdated Show resolved Hide resolved
FROM docker.io/library/golang:1.23 as builder
FROM registry.access.redhat.com/ubi9/ubi-minimal as builder

COPY go.mod /go.mod
Copy link
Member Author

Choose a reason for hiding this comment

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

This is used to detect the desired Go major.minor version, but could be changed to an ENV var if we want to extract this to a script for reuse.

manageiq-operator/Dockerfile Outdated Show resolved Hide resolved
manageiq-operator/Dockerfile Outdated Show resolved Hide resolved
@Fryguy
Copy link
Member

Fryguy commented Oct 2, 2024

I am curious what's in the golang image that causes it to be so much larger

manageiq-operator/Dockerfile Outdated Show resolved Hide resolved
- speed up build since there is less to download
- reduce external dependencies
- build and run on the same base image

REPOSITORY                TAG  IMAGE ID     CREATED         SIZE
my                        test 422e3c099772 10 seconds ago  366 MB
docker.io/library/golang  1.23 361d8b5c9aa5 3 weeks ago     862 MB

CP4AIOPS-7146
@Fryguy Fryguy merged commit 07b6768 into ManageIQ:master Oct 14, 2024
2 checks passed
@bdunne bdunne deleted the ubi_golang branch October 14, 2024 22:40
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