mirror of
https://github.com/minio/minio.git
synced 2025-11-09 13:39:46 -05:00
cleanup markdown docs across multiple files (#14296)
enable markdown-linter
This commit is contained in:
@@ -3,9 +3,10 @@
|
||||
See our web documentation on [Deploying MinIO in Standalone Mode](Deploy Standalone MinIO in a Container) for a more structured tutorial on deploying MinIO in a container.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Docker installed on your machine. Download the relevant installer from [here](https://www.docker.com/community-edition#/download).
|
||||
|
||||
## Run Standalone MinIO on Docker.
|
||||
## Run Standalone MinIO on Docker
|
||||
|
||||
*Note*: Standalone MinIO is intended for early development and evaluation. For production clusters, deploy a [Distributed](https://docs.min.io/minio/baremetal/installation/deployment-and-management.html) MinIO deployment.
|
||||
|
||||
@@ -22,7 +23,8 @@ docker run \
|
||||
|
||||
To create a MinIO container with persistent storage, you need to map local persistent directories from the host OS to virtual config. To do this, run the below commands
|
||||
|
||||
#### GNU/Linux and macOS
|
||||
### GNU/Linux and macOS
|
||||
|
||||
```sh
|
||||
mkdir -p ~/minio/data
|
||||
|
||||
@@ -38,7 +40,8 @@ docker run \
|
||||
|
||||
The command creates a new local directory `~/minio/data` in your user home directory. It then starts the MinIO container with the `-v` argument to map the local path (`~/minio/data`) to the specified virtual container directory (`/data`). When MinIO writes data to `/data`, that data is actually written to the local path `~/minio/data` where it can persist between container restarts.
|
||||
|
||||
#### Windows
|
||||
### Windows
|
||||
|
||||
```sh
|
||||
docker run \
|
||||
-p 9000:9000 \
|
||||
@@ -51,14 +54,17 @@ docker run \
|
||||
```
|
||||
|
||||
## Run Distributed MinIO on Docker
|
||||
Distributed MinIO can be deployed via [Docker Compose](https://docs.min.io/docs/deploy-minio-on-docker-compose). This means Docker Compose lets you quickly get started with Distributed MinIO on your computer - ideal for development, testing, staging environments. We recommend kubernetes based deployment for production level deployment https://github.com/minio/operator.
|
||||
|
||||
Distributed MinIO can be deployed via [Docker Compose](https://docs.min.io/docs/deploy-minio-on-docker-compose). This means Docker Compose lets you quickly get started with Distributed MinIO on your computer - ideal for development, testing, staging environments. We recommend kubernetes based deployment for production level deployment <https://github.com/minio/operator>.
|
||||
|
||||
## MinIO Docker Tips
|
||||
|
||||
### MinIO Custom Access and Secret Keys
|
||||
|
||||
To override MinIO's auto-generated keys, you may pass secret and access keys explicitly as environment variables. MinIO server also allows regular strings as access and secret keys.
|
||||
|
||||
#### GNU/Linux and macOS
|
||||
|
||||
```sh
|
||||
docker run \
|
||||
-p 9000:9000 \
|
||||
@@ -71,6 +77,7 @@ docker run \
|
||||
```
|
||||
|
||||
#### Windows
|
||||
|
||||
```powershell
|
||||
docker run \
|
||||
-p 9000:9000 \
|
||||
@@ -83,12 +90,15 @@ docker run \
|
||||
```
|
||||
|
||||
### Run MinIO Docker as a regular user
|
||||
|
||||
Docker provides standardized mechanisms to run docker containers as non-root users.
|
||||
|
||||
#### GNU/Linux and macOS
|
||||
|
||||
On Linux and macOS you can use `--user` to run the container as regular user.
|
||||
|
||||
> NOTE: make sure --user has write permission to *${HOME}/data* prior to using `--user`.
|
||||
|
||||
```sh
|
||||
mkdir -p ${HOME}/data
|
||||
docker run \
|
||||
@@ -103,6 +113,7 @@ docker run \
|
||||
```
|
||||
|
||||
#### Windows
|
||||
|
||||
On windows you would need to use [Docker integrated windows authentication](https://success.docker.com/article/modernizing-traditional-dot-net-applications#integratedwindowsauthentication) and [Create a container with Active Directory Support](https://blogs.msdn.microsoft.com/containerstuff/2017/01/30/create-a-container-with-active-directory-support/)
|
||||
|
||||
> NOTE: make sure your AD/Windows user has write permissions to *D:\data* prior to using `credentialspec=`.
|
||||
@@ -120,6 +131,7 @@ docker run \
|
||||
```
|
||||
|
||||
### MinIO Custom Access and Secret Keys using Docker secrets
|
||||
|
||||
To override MinIO's auto-generated keys, you may pass secret and access keys explicitly by creating access and secret keys as [Docker secrets](https://docs.docker.com/engine/swarm/secrets/). MinIO server also allows regular strings as access and secret keys.
|
||||
|
||||
```
|
||||
@@ -128,6 +140,7 @@ echo "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" | docker secret create secret_ke
|
||||
```
|
||||
|
||||
Create a MinIO service using `docker service` to read from Docker secrets.
|
||||
|
||||
```
|
||||
docker service create --name="minio-service" --secret="access_key" --secret="secret_key" quay.io/minio/minio server /data
|
||||
```
|
||||
@@ -135,7 +148,9 @@ docker service create --name="minio-service" --secret="access_key" --secret="sec
|
||||
Read more about `docker service` [here](https://docs.docker.com/engine/swarm/how-swarm-mode-works/services/)
|
||||
|
||||
#### MinIO Custom Access and Secret Key files
|
||||
|
||||
To use other secret names follow the instructions above and replace `access_key` and `secret_key` with your custom names (e.g. `my_secret_key`,`my_custom_key`). Run your service with
|
||||
|
||||
```
|
||||
docker service create --name="minio-service" \
|
||||
--secret="my_access_key" \
|
||||
@@ -144,13 +159,16 @@ docker service create --name="minio-service" \
|
||||
--env="MINIO_ROOT_PASSWORD_FILE=my_secret_key" \
|
||||
quay.io/minio/minio server /data
|
||||
```
|
||||
|
||||
`MINIO_ROOT_USER_FILE` and `MINIO_ROOT_PASSWORD_FILE` also support custom absolute paths, in case Docker secrets are mounted to custom locations or other tools are used to mount secrets into the container. For example, HashiCorp Vault injects secrets to `/vault/secrets`. With the custom names above, set the environment variables to
|
||||
|
||||
```
|
||||
MINIO_ROOT_USER_FILE=/vault/secrets/my_access_key
|
||||
MINIO_ROOT_PASSWORD_FILE=/vault/secrets/my_secret_key
|
||||
```
|
||||
|
||||
### Retrieving Container ID
|
||||
|
||||
To use Docker commands on a specific container, you need to know the `Container ID` for that container. To get the `Container ID`, run
|
||||
|
||||
```sh
|
||||
@@ -160,6 +178,7 @@ docker ps -a
|
||||
`-a` flag makes sure you get all the containers (Created, Running, Exited). Then identify the `Container ID` from the output.
|
||||
|
||||
### Starting and Stopping Containers
|
||||
|
||||
To start a stopped container, you can use the [`docker start`](https://docs.docker.com/engine/reference/commandline/start/) command.
|
||||
|
||||
```sh
|
||||
@@ -167,11 +186,13 @@ docker start <container_id>
|
||||
```
|
||||
|
||||
To stop a running container, you can use the [`docker stop`](https://docs.docker.com/engine/reference/commandline/stop/) command.
|
||||
|
||||
```sh
|
||||
docker stop <container_id>
|
||||
```
|
||||
|
||||
### MinIO container logs
|
||||
|
||||
To access MinIO logs, you can use the [`docker logs`](https://docs.docker.com/engine/reference/commandline/logs/) command.
|
||||
|
||||
```sh
|
||||
@@ -179,6 +200,7 @@ docker logs <container_id>
|
||||
```
|
||||
|
||||
### Monitor MinIO Docker Container
|
||||
|
||||
To monitor the resources used by MinIO container, you can use the [`docker stats`](https://docs.docker.com/engine/reference/commandline/stats/) command.
|
||||
|
||||
```sh
|
||||
|
||||
Reference in New Issue
Block a user