![]() Also, you could instead of defining the docker file just use the default image in the docker-compose.yml: version: '3.8' The solution is really simple: put your plugins in the D:\Docker\Moodle\Moodle\local\local_custom_api. Similarly in the second docker-compose.yml D:\\Docker\\Moodle\\Moodle:/bitnami/moodle # -> everything in the `/bitnami/moodle` is gone Therefore your copy at /bitnami/moodle/local/local_custom_api/ (in container) is hidden instead the directory is the same as D:\Docker\Moodle\Moodle #. you can't initialize the host directory with a container files there in this way). The docker docs says: if a container directory is non-empty it is hidden behind the contents of a bind-mounted directory (i.e. The problem is, in the docker compose, you are bind mounting to the parent directory of the directory that has been copied in the docker file. How can the host location affect the internal functionality of the container? Moodle-test-moodle-1 | grep: /opt/bitnami/moodle/config.php: No such file or directory Moodle-test-moodle-1 | moodle 16:04:16.25 INFO => Trying to connect to the database server Moodle-test-moodle-1 | moodle 16:04:14.19 INFO => Restoring persisted Moodle installation Moodle-test-moodle-1 | moodle 16:04:14.13 INFO => Validating settings in POSTGRESQL_CLIENT_* env vars Moodle-test-moodle-1 | moodle 16:04:14.12 INFO => Validating settings in MYSQL_CLIENT_* env vars Moodle-test-moodle-1 | moodle 16:04:14.10 INFO => Setting PHP expose_php option Moodle-test-moodle-1 | moodle 16:04:14.10 INFO => Configuring PHP options Moodle-test-moodle-1 | moodle 16:04:14.08 INFO => Configuring Apache ServerTokens directive Moodle-test-moodle-1 | realpath: /bitnami/apache/conf: No such file or directory Moodle-test-moodle-1 | moodle 16:04:14.05 INFO => ** Starting Moodle setup ** Moodle-test-moodle-1 | moodle 16:04:14.05 Submit issues and feature requests at Moodle-test-moodle-1 | moodle 16:04:14.05 Subscribe to project updates by watching Moodle-test-moodle-1 | moodle 16:04:14.05 Welcome to the Bitnami moodle container The install always crashes and the only files in the moodle_app volume are the plugin files that were copied successfully: moodle-test-moodle-1 | moodle 16:04:14.05 Here is the new docker-compose.yml version: '3.8' So I created named volumes but now the moodle install process cannot find a file although I just changed the host path of the volume The files do not show up in the specified volume.Īfter some research, it seems that I have to use named volumes to make the copy cmd work (don't really know why). This works fine and both containers are created and the moodle install script completes successfully but the copy cmd in the Dockerfile does not work. D:\\Docker\\Moodle\\MoodleData:/bitnami/moodledata ![]() ![]() D:\\Docker\\Moodle\\Moodle:/bitnami/moodle D:\\Docker\\Moodle\\Database:/var/lib/mysql local_custom_api/ /bitnami/moodle/local/local_custom_api/Īnd then I created the following docker-compose.yml version: '3.8' I did this in the Dockerfile FROM bitnami/moodle:latestĬOPY. To do so I have to copy the newest version of my plugin code to the location /bitnami/moodle/local/local_custom_api/ These containers should be used for testing custom PHP plugins for Moodle WebServices.
0 Comments
Leave a Reply. |