📅  最后修改于: 2023-12-03 15:31:03.737000             🧑  作者: Mango
Grafana is an open source platform for data visualization, monitoring, and analysis. Docker is a popular tool used for containerizing applications. Grafana can be run as a Docker container, making it easy to deploy and manage.
When you first run Grafana as a Docker container, you will need to log in to the web interface with a username and password. By default, the username is admin
and the password is admin
.
You should change the default password as soon as possible to ensure the security of your Grafana installation.
To run Grafana as a Docker container, you can use the following command:
docker run -d -p 3000:3000 grafana/grafana
This command will run the latest version of Grafana as a daemon (-d) and map port 3000 on the host to port 3000 on the container. You can access Grafana at http://localhost:3000 in a web browser.
To change the default username and password, you can use environment variables when running the container:
docker run -d \
-p 3000:3000 \
-e GF_SECURITY_ADMIN_USER=myuser \
-e GF_SECURITY_ADMIN_PASSWORD=mypassword \
grafana/grafana
This command will set the username to myuser
and the password to mypassword
. You can customize these values to your liking.
Using Grafana with Docker is a powerful way to quickly deploy and manage your monitoring and data visualization infrastructure. Remember to always keep your installation secure by changing default login credentials and following recommended security practices.