Page MenuHomePhabricator

Incomplete and bad instructions regarding volumes in docker container
Closed, InvalidPublic

Description

First of all, this bug report doesn't follow a template, in case you have one. I don't do templates. That's not me. I do free text.

I've been trying to setup wikimedia on docker, which is a little complicated to do because of the whole copying of LocalSettings.php shtick. You see, I want to make sure that my wiki works as intended for a long time which means I can not go around copying that file everytime I start up a new container. So I needed to find a solution where the LocalSettings.php file was read from a folder on my NAS which is tricky because of the whole mapping to a single file and not the folder stuff...

Anyway, that's not what this ticket is about. It's about the bad instructions.

"By default, this image does not include any volumes. The paths /var/www/html/images and /var/www/html/LocalSettings.php are things that generally ought to be volumes, but do not explicitly have a VOLUME declaration in this image because volumes cannot be removed."

That text makes no sense. Volumes can't be removed. Yes. That's a good thing. What, you want to remove them? I don't get what you're trying to say here, and it doesn't matter. You can just delete that and just write what mappings are needed.

So... I get from that that /var/www/html/images should be mapped to some host filesystem.
So I do that.

That's the extent of the instructions.

All fine and dandy, the wiki is running and I add a LOT of content. And hey ho, I get a skin or two, and some extensions, why not. And life is good. Right?

Wrong.

Because what happens when I need to drain that node on my swarm for a reboot, and the wiki gets started on another node?

Guess. Come on, guess.

Where are skins and extensions placed? UH OH! On the container that was just deleted, because you failed to document that those locations (and probably some other folders as well) need to be mapped to some filesystem as well for your application to function properly!

Event Timeline

Aklapper changed the task status from Open to Stalled.Feb 1 2020, 12:58 PM

Hi @Qwertysdf, thanks for taking the time to report this and welcome to Wikimedia Phabricator!

Please see what RhinosF1 already wrote here; apart from that:

Unfortunately this Phabricator task lacks some information. Please add a more complete description to this task, including a clear list (!) of specific steps to reproduce the situation (including links), actual results, expected results after performing the steps to reproduce, and remove any stuff irrelevant for reproducing this issue.
You can edit the task description by clicking Edit Task.
Ideally, exact and clear steps to reproduce should allow any other person to follow these steps (without having to interpret those steps) and see the same results. Problems that others can reliably reproduce can get fixed faster. Thanks.

dbarratt subscribed.

@Qwertysdf There are a lot of different ways in which you might want to setup MediaWiki using the docker image. Forcing a specific setup by specifying the VOLUMES might be helpful to some use-cases, but is a detriment to others. For instance, I personally might mount the entire /var/www/html directory for development as a volume, but on my server, I might create a new image that extends this one and copies the extensions I want at build time and does not mount anything. In either instance, I don't want the VOLUMES being declared/forced. If docker provided a way to remove the volumes, I think it would be fine to define the most popular use case in the Dockerfile, but that isn't the case. If you want the VOLUMES to be declared, I would suggest extending the image with the FROM directive.

If the documentation needs more clarity, please update the file here: https://github.com/docker-library/docs/blob/master/mediawiki/content.md#volumes