PackageJson: Prettify markdown/mdx on commit with lint-staged (#37616)

* Format md,mdx files with prettier on lint-staged

* Manually run prettier on docs/sources
This commit is contained in:
Connor Lindsey
2021-08-06 07:52:36 -06:00
committed by GitHub
parent e9c032f10f
commit b78a67cec7
301 changed files with 3216 additions and 2980 deletions
+17 -12
View File
@@ -12,6 +12,7 @@ You can install and run Grafana using the official Docker image. It comes in two
This page also contains important information about [migrating from earlier Docker image versions](#migrate-from-previous-docker-containers-versions).
## Alpine image (recommended)
`grafana/grafana:<version>`
This is the default image. It's based on the popular [Alpine Linux project](http://alpinelinux.org), available in [the Alpine official image](https://hub.docker.com/_/alpine). Alpine Linux is much smaller than most distribution base images, and thus leads to slimmer and more secure images.
@@ -21,6 +22,7 @@ This variant is highly recommended when security and final image size being as s
> **Note:** The `grafana/grafana:<version>` image was based on [Ubuntu](https://ubuntu.com/) before version 6.4.0.
## Ubuntu image
`grafana/grafana:<version>-ubuntu`
This image is based on [Ubuntu](https://ubuntu.com/), available in [the Ubuntu official image](https://hub.docker.com/_/ubuntu). It is an alternative image for those who prefer an [Ubuntu](https://ubuntu.com/) based image and/or are dependent on certain tooling not available for Alpine.
@@ -28,6 +30,7 @@ This image is based on [Ubuntu](https://ubuntu.com/), available in [the Ubuntu o
> **Note:** The `grafana/grafana:<version>-ubuntu` image is available for Grafana version 6.5.0 and later.
## Run Grafana
You can run the latest Grafana version, run a specific version, or run an unstable version based on the main branch of the [grafana/grafana GitHub repository](https://github.com/grafana/grafana).
### Run the latest stable version of Grafana
@@ -47,15 +50,16 @@ docker run -d -p 3000:3000 --name grafana grafana/grafana:<version number>
```
**Example:**
```bash
docker run -d -p 3000:3000 --name grafana grafana/grafana:6.5.0
```
### Run the Grafana main branch
For every successful build of the main branch, we update the `grafana/grafana:main` and `grafana/grafana:main-ubuntu` tags. Additionally, two new tags are created, `grafana/grafana-dev:<version>-<build ID>pre` and `grafana/grafana-dev:<version>-<build ID>pre-ubuntu`, where *version* is the next version of Grafana and *build ID* is the ID of the corresponding CI build. Use these to get access to the latest main builds of Grafana.
For every successful build of the main branch, we update the `grafana/grafana:main` and `grafana/grafana:main-ubuntu` tags. Additionally, two new tags are created, `grafana/grafana-dev:<version>-<build ID>pre` and `grafana/grafana-dev:<version>-<build ID>pre-ubuntu`, where _version_ is the next version of Grafana and _build ID_ is the ID of the corresponding CI build. Use these to get access to the latest main builds of Grafana.
When running Grafana main in production, we *strongly* recommend that you use the `grafana/grafana-dev:<version>-<build ID>pre` tag. This tag guarantees that you use a specific version of Grafana instead of whatever was the most recent commit at the time.
When running Grafana main in production, we _strongly_ recommend that you use the `grafana/grafana-dev:<version>-<build ID>pre` tag. This tag guarantees that you use a specific version of Grafana instead of whatever was the most recent commit at the time.
For a list of available tags, check out [grafana/grafana](https://hub.docker.com/r/grafana/grafana/tags/) and [grafana/grafana-dev](https://hub.docker.com/r/grafana/grafana-dev/tags/).
@@ -91,7 +95,7 @@ docker run -d \
grafana/grafana
```
## Build and run a Docker image with pre-installed plugins
## Build and run a Docker image with pre-installed plugins
You can build your own customized image that includes plugins. This saves time if you are creating multiple images and you want them all to have the same plugins installed on build.
@@ -102,6 +106,7 @@ In the [Grafana GitHub repository](https://github.com/grafana/grafana) there is
> If you need to specify the version of a plugin, you can add it to the `GF_INSTALL_PLUGINS` build argument. Otherwise, the latest will be assumed. For example: `--build-arg "GF_INSTALL_PLUGINS=grafana-clock-panel 1.0.1,grafana-simple-json-datasource 1.3.5"`
Example of how to build and run:
```bash
cd packaging/docker/custom
docker build \
@@ -135,6 +140,7 @@ Replace `Dockerfile` in above example with `ubuntu.Dockerfile` to build a custom
The [Grafana Image Renderer plugin]({{< relref "../administration/image_rendering/#grafana-image-renderer-plugin" >}}) does not currently work if it is installed in a Grafana Docker image. You can build a custom Docker image by using the `GF_INSTALL_IMAGE_RENDERER_PLUGIN` build argument. This installs additional dependencies needed for the Grafana Image Renderer plugin to run.
Example of how to build and run:
```bash
cd packaging/docker/custom
docker build \
@@ -159,7 +165,6 @@ The Grafana Docker image runs with the `root` group (id 0) instead of the `grafa
Grafana Docker image now comes in two variants, one [Alpine](http://alpinelinux.org) based and one [Ubuntu](https://ubuntu.com/) based, see [Image Variants](#image-variants) for details.
### Migrate to v6.4 or later
Grafana Docker image was changed to be based on [Alpine](http://alpinelinux.org) instead of [Ubuntu](https://ubuntu.com/).
@@ -189,11 +194,11 @@ You should always be careful to define your own named volume for storage, but if
In Grafana v5.1, we changed the ID and group of the Grafana user and in v7.3 we changed the group. Unfortunately this means that files created prior to v5.1 won't have the correct permissions for later versions. We made this change so that it would be more likely that the Grafana users ID would be unique to Grafana. For example, on Ubuntu 16.04 `104` is already in use by the syslog user.
Version | User | User ID | Group | Group ID
--------|---------|---------|---------|---------
< 5.1 | grafana | 104 | grafana | 107
\>= 5.1 | grafana | 472 | grafana | 472
\>= 7.3 | grafana | 472 | root | 0
| Version | User | User ID | Group | Group ID |
| ------- | ------- | ------- | ------- | -------- |
| < 5.1 | grafana | 104 | grafana | 107 |
| \>= 5.1 | grafana | 472 | grafana | 472 |
| \>= 7.3 | grafana | 472 | root | 0 |
There are two possible solutions to this problem. Either you start the new container as the root user and change ownership from `104` to `472`, or you start the upgraded container as user `104`.
@@ -204,15 +209,16 @@ docker run --user 104 --volume "<your volume mapping here>" grafana/grafana:5.1.
```
##### Specify a user in docker-compose.yml
```yaml
version: "2"
version: '2'
services:
grafana:
image: grafana/grafana:5.1.0
ports:
- 3000:3000
user: "104"
user: '104'
```
#### Modify permissions
@@ -240,4 +246,3 @@ Refer to [Configure a Grafana Docker image]({{< relref "../administration/config
## Configure Grafana
Refer to the [Configuration]({{< relref "../administration/configuration.md" >}}) page for details on options for customizing your environment, logging, database, and so on.