-
Notifications
You must be signed in to change notification settings - Fork 119
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
🌱 Update Dockerfile #591
base: main
Are you sure you want to change the base?
🌱 Update Dockerfile #591
Conversation
Update Dockerfile, add basic labels and speed-up the build process: - use curl instead of git for repository download - use build-time bash shell with '-exo pipefail' for error catching - add proper labeling of resulting image - further improve image size by reducing layers number using one RUN command. - other minor improvements Signed-off-by: Miłosz Linkiewicz <[email protected]>
|
||
USER ironic | ||
WORKDIR / | ||
ENTRYPOINT ["/bin/bash"] |
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.
The entrypoint does not look right.
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 also probably not needed
LABEL org.opencontainers.image.title="Metal3 Ironic Container" | ||
LABEL org.opencontainers.image.description="Container image to run OpenStack Ironic as part of Metal³" | ||
LABEL org.opencontainers.image.documentation="https://github.com/metal3-io/ironic-image/blob/main/README.md" | ||
LABEL org.opencontainers.image.version="v26.0.1" |
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.
Good call. We'd need to update our releasing documentation to bump this (I expect the next version to be 26.1.0 or 27.0.0). CC @elfosardo
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.
We should not have anything but latest in main tho
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 ok for released branches, as Dmitry said probably need to add this when we cut a new branch
in main we should just have latest
Many reasonable changes here, but I'd slightly prefer several pull requests so that we can consider them separately. A couple of comments (+ requesting input from Riccardo) |
@@ -7,25 +9,33 @@ ARG BASE_IMAGE=quay.io/centos/centos:stream9 | |||
FROM $BASE_IMAGE AS ironic-builder | |||
|
|||
ARG IPXE_COMMIT_HASH=119c415ee47aaef2717104fea493377aa9a65874 | |||
ARG MAKEFLAGS="-j100" |
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.
A 100 jobs, I don't think thats reasonable default.
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.
no need to set MAKEFLAGS at all
LABEL org.opencontainers.image.url="https://github.com/metal3-io/ironic-image" | ||
LABEL org.opencontainers.image.title="Metal3 Ironic Container" | ||
LABEL org.opencontainers.image.description="Container image to run OpenStack Ironic as part of Metal³" | ||
LABEL org.opencontainers.image.documentation="https://github.com/metal3-io/ironic-image/blob/main/README.md" |
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.
Documentation would maybe better point to our user-guide?
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 agree, let's point to the user guide
/ok-to-test |
thanks for the patch, appreciate the improvements |
What this PR does / why we need it:
Update Dockerfile, add basic labels and speed-up the build process:
curl
instead ofgit
for repository download-exo pipefail
for error catchingENTRYPOINT
addedUSER
added