使用docker-compose部署MinIO

services:
  minio:

    command:
      - "server"
      - "/data"
      - "--console-address"
      - ":9090"
      - "-address"
      - ":9000"

    container_name: "minio"

    entrypoint:
      - "/usr/bin/docker-entrypoint.sh"

    environment:
      - "MINIO_ACCESS_KEY=wshlyl"
      - "MINIO_SECRET_KEY=wsh9210832"
      - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
      - "MINIO_ACCESS_KEY_FILE=access_key"
      - "MINIO_SECRET_KEY_FILE=secret_key"
      - "MINIO_ROOT_USER_FILE=access_key"
      - "MINIO_ROOT_PASSWORD_FILE=secret_key"
      - "MINIO_KMS_SECRET_KEY_FILE=kms_master_key"
      - "MINIO_UPDATE_MINISIGN_PUBKEY=RWTx5Zr1tiHQLwG9keckT0c45M3AGeHD6IvimQHpyRywVWGbP1aVSGav"
      - "MINIO_CONFIG_ENV_FILE=config.env"
      - "MC_CONFIG_DIR=/tmp/.mc"

    hostname: "6171da4ea690"

    image: "minio/minio"

    ipc: "private"

    labels:
      architecture: "x86_64"
      build-date: "2025-03-10T17:11:09Z"
      com.redhat.component: "ubi9-micro-container"
      com.redhat.license_terms: "https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI"
      description: "MinIO object storage is fundamentally different. Designed for performance and the\
        \ S3 API, it is 100% open-source. MinIO is ideal for large, private cloud environments with stringent\
        \ security requirements and delivers mission-critical availability across a diverse range of workloads."
      distribution-scope: "public"
      io.buildah.version: "1.39.0-dev"
      io.k8s.description: "Very small image which doesn't install the package manager."
      io.k8s.display-name: "Red Hat Universal Base Image 9 Micro"
      io.openshift.expose-services: ""
      maintainer: "MinIO Inc <dev@min.io>"
      name: "MinIO"
      release: "RELEASE.2025-03-12T18-04-18Z"
      summary: "MinIO is a High Performance Object Storage, API compatible with Amazon S3 cloud storage\
        \ service."
      url: "https://www.redhat.com"
      vcs-ref: "6417a05b5f45b0d312c5c436b8bbe8b67cbdb551"
      vcs-type: "git"
      vendor: "MinIO Inc <dev@min.io>"
      version: "RELEASE.2025-03-12T18-04-18Z"

    logging:
      driver: "db"
      options: {}

    mac_address: "02:42:ac:11:00:03"

    network_mode: "bridge"

    ports:
      - "9000:9000/tcp"
      - "9090:9090/tcp"

    restart: "always"

    volumes:
      - "/volume3/MinIo:/data"
      - "/volume3/MinIo:/root/.minio"

    working_dir: "/"

version: "3.6"