分类 网站 下的文章

简记

docker-compose.yml

# MediaWiki with MariaDB
#
# Access via "http://localhost:1616"
#   (or "http://:1616" if using docker-machine)
version: '3'
services:
  mediawiki:
    image: mediawiki
    container_name: wiki
    restart: always
    ports:
      - 1616:80
    links:
      - database
    volumes:
      - /var/www/html/images
      # After initial setup, download LocalSettings.php to the same directory as
      # this yaml and uncomment the following line and use compose to restart
      # the mediawiki service
      #- ./LocalSettings.php:/var/www/html/LocalSettings.php
  database:
    image: mariadb
    container_name: db
    restart: always
    ports:
      - 3316:3306
    environment:
      # @see https://phabricator.wikimedia.org/source/mediawiki/browse/master/includes/DefaultSettings.php
      MYSQL_DATABASE: my_wiki
      MYSQL_USER: wikiuser
      MYSQL_PASSWORD: '#JN&QzB5EM!9D%K7dK3t9tV%&u'
      MYSQL_RANDOM_ROOT_PASSWORD: 1
    volumes:
      - /var/lib/mysql

移动php文件时,注意先更改755再复制进Docker

大概效果

mediawiki_aliyun