echo"Restarting mediawiki container" docker run --name mediawiki \ --link mysql:mysql \ -p 8080:80 \ # After initial setup, download LocalSettings.php to the same directory and uncomment below code, then restart mediawiki # -v $HOME/mywiki/mediawiki/config/LocalSettings.php:/var/www/html/LocalSettings.php \ -v $HOME/mywiki/mediawiki/images:/var/www/html/images \ -v $HOME/mywiki/mediawiki/resources/assets/mywiki.jpg:/var/www/html/resources/assets/mywiki.jpg \ -d arm64v8/mediawiki:1.35.9 \
docker ps 检查两个container是否都正常运行起来了。
1 2 3 4
haofan@haofan:~/mywiki/mediawiki$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 259197fb1486 arm64v8/mediawiki:1.35.9 "docker-php-entrypoi…" 37 seconds ago Up 36 seconds 0.0.0.0:8080->80/tcp, :::8080->80/tcp mediawiki cd448396fc1f arm64v8/mysql:8-oracle "docker-entrypoint.s…" 37 minutes ago Up 37 minutes 3306/tcp, 33060/tcp mysql