官网:https://www.minio.org.cn/docs/cn/minio/container/index.html
mkdir -p /opt/docker/minio/data sudo docker run -itd --restart=always --privileged \ -p 9000:9000 \ -p 9090:9090 \ --name minio \ -v /opt/docker/minio/data:/data \ -e "MINIO_ROOT_USER=admin" \ -e "MINIO_ROOT_PASSWORD=admin123" \ quay.io/minio/minio server /data --console-address ":9090"
The example above works this way:
-
mkdircreates a new local directory at~/minio/datain your home directory. -
docker runstarts the MinIO container. -
-pbinds a local port to a container port. -
-namecreates a name for the container. -
-vsets a file path as a persistent volume location for the container to use. When MinIO writes data to/data, that data mirrors to the local path~/minio/data, allowing it to persist between container restarts. You can replace~/minio/datawith another local file location to which the user has read, write, and delete access. -
-esets the environment variablesMINIO_ROOT_USERandMINIO_ROOT_PASSWORD, respectively. These set the root user credentials. Change the example values to use for your container.
浙公网安备 33010602011771号