+
Skip to content

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

Merged
merged 1 commit into from
Jul 17, 2025

Conversation

somln
Copy link
Contributor

@somln somln commented Jul 17, 2025

Closes #41029

Closes keycloak#41029

Signed-off-by: Somin Park <ps4708@naver.com>
@somln somln requested review from a team as code owners July 17, 2025 06:18
Copy link
Contributor

@mabartos mabartos left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@mabartos mabartos merged commit 0d71b4e into keycloak:main Jul 17, 2025
55 checks passed
@@ -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 .`
Copy link
Contributor

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes ... @mabartos or @somln, can you please wrap that? If you do it straight away, use the same issue number and create another PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the clarification, @ahus1!
@vmuzikar – I’ll submit a follow-up PR shortly with the note wrapped in ifdef::!product[], referencing #41029.

Copy link
Contributor

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.

Comment on lines +152 to +156
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
Copy link
Contributor

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.

Copy link
Contributor

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

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.

DOC: 'Running Keycloak in a Container' inconsistent
4 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载