-
Notifications
You must be signed in to change notification settings - Fork 7.4k
DOC: Explain Containerfile usage and fix docker build example #41213
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
Conversation
Closes keycloak#41029 Signed-off-by: Somin Park <ps4708@naver.com>
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.
LGTM, thanks!
@@ -24,6 +24,8 @@ For the best start up of your {project_name} container, build an image by runnin | |||
This step will save time in every subsequent start phase of the container image. | |||
|
|||
=== Writing your optimized {project_name} Containerfile | |||
NOTE: A Containerfile is functionally identical to a Dockerfile and uses the same syntax. The term "Containerfile" is used to be more tool-agnostic, especially in non-Docker environments like Podman or Buildah. When using Docker, you have two options: either name your file `Dockerfile` (which Docker expects by default), or keep the name `Containerfile` and specify it explicitly using the `-f` flag: `docker build -f Containerfile -t mykeycloak .` |
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'm not sure if this note shouldn't have been excluded for product.
CC @ahus1
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.
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.
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.
@vmuzikar Good point, thanks for the additional consideration.
podman build . -t mykeycloak | ||
# or for Docker (specify the Containerfile explicitly): | ||
docker build -f Containerfile . -t mykeycloak | ||
# or rename Containerfile to Dockerfile and use: | ||
docker build . -t mykeycloak |
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.
@ahus1 IIRC, we also have a logic somewhere to replace podman|docker
with just podman
, correct? So this won't work for prod either, AFAICT.
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'll check once I review that follow-up PR
Closes #41029