diff --git a/docs/guides/server/containers.adoc b/docs/guides/server/containers.adoc index f3e168cf8b8..0f5fb47228d 100644 --- a/docs/guides/server/containers.adoc +++ b/docs/guides/server/containers.adoc @@ -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>