📅  最后修改于: 2023-12-03 14:43:39.545000             🧑  作者: Mango
Keycloak is an open source identity and access management solution. Keycloak Docker is a containerized version of Keycloak that enables you to easily deploy and run Keycloak in a Docker container.
This guide will walk you through the steps to run Keycloak Docker using the Shell/Bash command line interface.
To follow this guide, you'll need the following:
Open the Shell/Bash command prompt.
Pull the Keycloak Docker image from Docker Hub by entering the following command:
docker pull jboss/keycloak
This will download the Keycloak Docker image to your local machine.
Start a Keycloak Docker container by entering the following command:
docker run -d --name keycloak -p 8080:8080 jboss/keycloak
This will start a Keycloak Docker container running in detached mode with the name "keycloak" and expose the container's port 8080 to the host machine's port 8080.
Wait for the Keycloak container to start up. You can check the logs of the container to see the progress by entering the following command:
docker logs -f keycloak
You should see log messages indicating that Keycloak is starting up.
Access the Keycloak web interface in a web browser by navigating to http://localhost:8080/auth. You should see the Keycloak login screen.
Log in to Keycloak using the default administrator credentials: Username admin
and password admin
.
You can now configure Keycloak according to your needs. Refer to the Keycloak documentation for more information on how to use Keycloak.
Stop the Keycloak Docker container by entering the following command:
docker stop keycloak
This will stop the Keycloak Docker container.
In this guide, you learned how to easily deploy and run Keycloak in a Docker container using the Shell/Bash command line interface. With Keycloak, you can easily manage identities and access for your applications and services.