mirror of
https://github.com/keycloak/keycloak.git
synced 2025-12-21 06:20:05 -06:00
DOC: Explain Containerfile usage and fix docker build example (#41213)
Closes #41029 Signed-off-by: Somin Park <ps4708@naver.com>
This commit is contained in:
@@ -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 .`
|
||||
|
||||
The following `Containerfile` creates a pre-configured {project_name} image that enables the health and metrics endpoints, enables the token exchange feature, and uses a PostgreSQL database.
|
||||
|
||||
.Containerfile:
|
||||
@@ -147,7 +149,11 @@ To build the actual container image, run the following command from the director
|
||||
|
||||
[source,bash]
|
||||
----
|
||||
podman|docker build . -t mykeycloak
|
||||
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
|
||||
----
|
||||
|
||||
<@profile.ifProduct>
|
||||
|
||||
Reference in New Issue
Block a user