【从零开始配置VPS】03:MariaDB

发布于 2023-01-03  33 次阅读


version: "2.1"
services:
  mariadb:
    image: linuxserver/mariadb:latest
    container_name: mariadb
    environment:
      - PUID=1000
      - PGID=1000
      - MYSQL_ROOT_PASSWORD=ROOT_ACCESS_PASSWORD
      - TZ=Asia/Shanghai
    volumes:
      - ./config:/config
    ports:
      - 3306:3306
    restart: unless-stopped
  • mkdir -p ~/db/MariaDB && cd ~/db/MariaDB
  • nano docker-compose.yml
  • sudo docker-compose up -d

一枚爱好探索的医学生