DHI MediaWiki not working No DB

Hi everyone

I want to use the DHI version of MediaWiki on Debian server for hosting a public web server for production purpose. This is a student project, the goal is to use it on my Raspberry Pi 5 (I will use the Linux/arm64 version).
First of all I’m trying to use it in a Debian VM and I follow the guide on the DHI version of Mediawiki and when I access the Mediawiki server with the IP address of the server the second page of the installation wizard is empty.

How could I use a DataBase Server (like MariaDB) for this project with the DHI of Mediawiki?

Here is what I did:

  1. Debian 13 VM on Proxmox
  2. I download Docker following this documentation: Debian | Docker Docs
  3. I read the Hardened Images catalog | MediaWiki | Guides | Docker Hub
  4. Login with the root user with su -
  5. I want to work on my “home” directory for this: cd /home/jamblond
  6. New file for Compose: nano docker-compose.yml and past the 1st Docker Compose file from the Guide earlier with mediawiki:1-debian13-php-fpm
  7. Then nano nginx.conf and past the Nginx configuration file
  8. Connect my Docker account with docker login dhi.io
  9. Start the Docker app with docker compose up -d
    (no docker-compose because command not found)
  10. I used the command hostname -I to get the IP address of the server
  11. I open Firefox and past the IP address

BTW I would like to report a mistake in the Docker Compose from the DHI Repo: on "nginx: image: I needed to add dhi .io because it was missing and without this I have an error “Error pull access denied for dhi/nginx, repository does not exist or may require 'docker login’”

I spend 4 days on this issue I hope someone can help my
I don’t have a lot of knowledge about Docker so sorry if I missed something important.

Kind regards; Jamblond
PS: English is not my native language :sweat_smile:

I moved the topic to the General category from Support as it is not really for the Docker Support team.

My guess is that the page could not load because of some error. The developer console in the webbrowser on the network tab or console tab could show some informaiton. For example not available Javascript or CSS. You could also check the container logs. If there is an nginx error, it might not return the actual webpage if nginx for that specific URL is configured incorrectly. Based on what error messages you find, you can fix the configuration and I assume continue the MediaWiki settings through the webinterface.

Hardened or not hardened images, this process is usually the same. You might find something that needs to be fixed in the hardened image, but finding error messages is the first.

It seems the database is not part of the guide. I don’t know MediaWiki enough. If it supports databases like sqlite created automatically, adding it as another container might not be necessary. And you need to add the database to the compose file or as an external service.

The guide should indeed show docker compose not docker-compose. The latter was the old way and now it could be an alias to the other one on some machines like when Docker Desktop is used, but not available everywhere.

Another problem with the guide. Thanks for sharing. Could you also report these two mistakes on GitHub, so the developers can fix it?

NOTE: You can use code highlighting for texts like dhi.io so you don’t need to leave a space i it to avoid converting it to link.

1 Like

Hello @rimelek

Here are some screenshots (from Firefox) if it can help (I trid to switch my browser language to English but it didn’t changed the display language of the dev. console).
I used Imgur.com to upload screenshots but I can use another tool if needed

https://imgur.com/a/t5EfSDh

For context, 172.24.7.10 is the working version of MediaWiki and 172.24.7.11 is the DHI MediaWiki

I will do this when back home :+1:

Oh ok :100:

Thank you for your help :slight_smile:

Edit: I merged draft and official mail in the same post, sorry.

There is one error message that always come back, but I don’t know what it means, I have no clue

NOTICE: PHP message: PHP Warning:  proc_open(): posix_spawn() failed: No such file or directory in /var/www/html/vendor/wikimedia/shellbox/src/Command/UnboxedExecutor.php on line 246

Since I followed every guides step by step and in the end I still have a broken Docker app I would like to know how Docker Hardened Images are built and whether they have been tested to ensure they work properly?

You can see most of it in the repository itself:

Note: Hardend images do not use the classic Dockerfile syntax, they use the dhi/build syntax instead.

You should find the output for the relevant steps as attestation. For instance there is a predicate type https://scout.docker.com/tests/v0.1 that holds the output of the text execution (but it’s base64 encoded).

It looks like the “-dev” works. I did not find out what the difference is between the two. I suspected permission issues, vecause the dev version runs processes as root, the otherwone runs processes as “nonroot”, but simply changing the userid to “0” didn’t help.

Hi
I tried to install MediaWiki DHI (with dhi.io/mediawiki:1-debian13-php-fpm-dev) but MediaWiki requires to know the Database hots, name, table prefix, username and password.
Using this version of M.W., what could be the correct answer?

MediaWiki uses a file based sqlite3 database by default, unless you provide an external database.
The DHI image should have the same behavior the official image provides.

Actually, the default on the installer was indeed MySQL when I tested, so it has to be switched to Sqlite or a MySQL / MariaDB database server has to be installed. That is the choice of the user, but it is somehting that could be menitoned in the description of the image as well

Will this issue be fixed? If you haven’t told the dev yet, how can I get in touch with them (I will create an issue on their GitHub today for the mistake on the guide (dhi/nginx))?

@rimelek I’m not sure what you’re talking about, but MySQL/MariaDB is the default option on the installation wizard fot every M.W. clean install.

@meyay I will probably use dhi.io/mysql:9.6-debian13 and share with you my docker compose when it will done.

Thank you so much everyone for your help :heart:!

Isn’t this what I wrote? :slight_smile:

I wrote it was the default when I tested the installation so you need to change it to SQLite or if you leave it on Default setting, you need to install a MySQL database server somewhere.

I think the answer was meant for me :slight_smile: The core message is that only sqlite is supported by the image out of the box, and databases must be privided outside the container. I should have phrased it differently in my last post.

Update:

I added an issue report on [bug]: DHI MediaWiki 1.45 (php-fpm) not working · Issue #223 · docker-hardened-images/catalog · GitHub
and
[bug]: missing dhi.io in docker-compose.yml · Issue #215 · docker-hardened-images/catalog · GitHub

I don’t know what else I could do now, but I’m open to suggestions.

See you soon

Update #2:
I noticed an update on the mediawiki 1.45-php-fpm.yaml file from the DHI’s Catalog GitHub Repo and now it works perfectly fine! Thank you everyone for your help and thanks you very much to the dev(s) who fixed this issue :heart:!

Edit: I don’t how to do that, but if an admin see my message you can both change my Forum post and Issue report on Github as Closed/Fixed)

Have a nice week everyone :grin: :heart:

1 Like

Thank you for bringing it to the attention of the devs! Not everyone who performs a fresh installation can benefit from the fix!

You already discovered how to close the GitHub issue.
I will mark your lat post as solution. For the future: if you are a post owner, you can mark a post as solution. The topic won’t be closed, but people would be notified that the topic already has a solution.