Coder Social home page Coder Social logo

moodle-php-apache's Introduction

moodle-php-apache: A Moodle PHP Environment

A Moodle PHP environment configured for Moodle development based on Official PHP Images.

Versions

PHP Version Variant Tags Status Notes
PHP 8.3 Bookworm dev Test and publish 8.3
PHP 8.3 Bookworm 8.3, 8.3-bookworm Test and publish 8.3
PHP 8.2 Bookworm 8.2, 8.2-bookworm Test and publish 8.2
PHP 8.1 Bookworm 8.1, 8.1-bookworm Test and publish 8.1
PHP 8.3 Bullseye 8.3-bullseye Test and publish 8.3
PHP 8.2 Bullseye 8.2-bullseye Test and publish 8.2
PHP 8.1 Bullseye 8.1-bullseye Test and publish 8.1
PHP 8.0 Bullseye 8.0, 8.0-bullseye Test and publish 8.0 PHP 8.0 EOL
PHP 7.4 Bullseye 7.4, 7.4-bullseye Test and publish 7.4 PHP 7.4 EOL
PHP 8.2 Buster 8.2-buster Test and publish 8.2 Buster EOL. Not updated since 8.2.7, June 2023
PHP 8.1 Buster 8.1-buster Test and publish 8.1 Buster EOL. Not updated since 8.1.20, June 2023
PHP 8.0 Buster 8.0-buster Test and publish 8.0 Buster and PHP 8.0 EOL
PHP 7.4 Buster 7.4-buster Test and publish 7.4 Buster and PHP 7.4 EOL
PHP 7.3 Buster 7.3, 7.3-buster Test and publish 7.3 Buster and PHP 7.3 EOL
PHP 7.2 Buster 7.2, 7.2-buster Build Status Buster and PHP 7.2 EOL
PHP 7.1 Buster 7.1, 7.1-buster Build Status Buster and PHP 7.1 EOL
PHP 7.3 Stretch 7.3-stretch Build Status Stretch and PHP 7.3 EOL
PHP 7.2 Stretch 7.2-stretch Build Status Stretch and PHP 7.2 EOL
PHP 7.1 Stretch 7.1-stretch Build Status Stretch and PHP 7.1 EOL
PHP 7.0 Stretch 7.0, 7.0-stretch Build Status Stretch and PHP 7.0 EOL
PHP 5.6 Stretch 5.6, 5.6-stretch Build Status Stretch and PHP 5.6 EOL
PHP 7.1 Jessie 7.1-jessie Build Status Jessie and PHP 7.1 EOL
PHP 7.0 Jessie 7.0-jessie Build Status Jessie and PHP 7.0 EOL
PHP 5.6 Jessie 5.6-jessie Build Status Jessie and PHP 5.6 EOL

Example usage

The following command will expose the current working directory on port 8080:

$ docker run --name web0 -p 8080:80  -v $PWD:/var/www/html moodlehq/moodle-php-apache:7.1

Features

  • Preconfigured with all php extensions required for Moodle development and all database drivers
  • Serves wwroot configured at /var/www/html/
  • For PHP 7.3 and up, both linux/amd64 and linux/arm64 images are being built. Note that linux/arm64 doesn't support the sqlsrv and oci extensions yet. Other than that, both architectures work exactly the same.
  • Verified by automated tests.
  • Autobuilt from GHA, on push.
  • Support for entrypoint scripts and PHP Configuration
  • Many common extensions available

Directories

To facilitate testing and easy setup the following directories are created and owned by www-data by default:

  • /var/www/moodledata
  • /var/www/phpunitdata
  • /var/www/behatdata
  • /var/www/behatfaildumps

Initialisation scripts

If you would like to do additional initialization, you can add one or more *.sh, or *.ini scripts under /docker-entrypoint.d (creating the directory if necessary). When the entrypoint script is called, it will run any executable *.sh script, source any non-executable *.sh scripts found in that directory, and will copy any *.ini scripts into the PHP Configuration directory (/usr/local/etc/php/conf.d).

For example, to configure PHP to support a higher upload_max_filesize option you might add the following to a config/10-uploads.ini file:

; Specify a max filesize of 200M for uploads.
upload_max_filesize = 200M
post_max_size = 210M

When starting your container you could do so passing in the config directory:

docker run \
    --name web0 \
    -p 8080:80 \
    -v $PWD/moodle:/var/www/html
    -v $PWD/config:/docker-entrypoint.d \
    moodle-php-apache:latest

These initialization files will be executed in sorted name order as defined by the current locale, which defaults to en_US.utf8.

PHP Configuration

As a lightweight alternative to a full PHP configuration file, you can specify a set of prefixed environment variables when starting your container with these variables turned into ini-format configuration.

Any environment variable whose name is prefixed with PHP_INI- will have the prefix removed, and will be added to a new ini file before the main command starts.

docker run \
    --name web0 \
    -p 8080:80 \
    -v $PWD/moodle:/var/www/html
    -e PHP_INI-upload_max_filesize=200M \
    -e PHP_INI-post_max_size=210M \
    moodle-php-apache:latest

Extensions

The following extensions are included as standard:

  • apcu
  • exif
  • gd
  • igbinary
  • intl
  • ldap
  • memcached
  • mysqli
  • oci8
  • opcache
  • pcov
  • pgsql
  • redis
  • soap
  • solr
  • sqlsrv
  • timezonedb
  • uuid
  • xdebug
  • xhprof
  • xsl
  • zip

All of the above extensions are enabled by default, except for:

  • pcov
  • xdebug
  • xhprof

Enabling optional extensions

Several extensions are installed, but not enabled. You can enable them easily.

xdebug

The xdebug extension can be enabled by specifying the following environment variable when starting the container:

PHP_EXTENSION_xdebug=1

xhprof

The xdebug extension can be enabled by specifying the following environment variable when starting the container:

PHP_EXTENSION_xhprof=1

pcov

The pcov extension is typically not used in the web UI, but is widely used for code coverage generation in unit testing.

It can be enabled by specifying the following environment variable when starting the container:

PHP_INI-pcov.enabled=1

See also

This container is part of a set of containers for Moodle development, see also:

  • moodle-docker a docker-composer based set of tools to get Moodle development running with zero configuration
  • moodle-db-mssql Microsoft SQL Server for Linux configured for Moodle development
  • moodle-db-oracle Oracle XE configured for Moodle development

moodle-php-apache's People

Contributors

abias avatar andrewnicols avatar danpoltawski avatar dmonllao avatar rlorenzo avatar sarjona avatar scara avatar stronk7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

moodle-php-apache's Issues

Include binaries used by the TEX filter

It would be useful if the binaries used by the TEX plugin could be installed on the image, so that all the options in the TEX filter can be used in moodle-docker

It looks like it needs the following packages installing:

  • texlive-latex-recommended
  • imagemagick

ECR Public Gallery image

I don't see this image available on AWS ECR Public Gallery.
It would be very nice if it was built and sent there as an option. Many docker users are switching to using other repositories, and since our environments are in AWS it would make sense to have it there: https://gallery.ecr.aws

Improve clarity and build process

We should improve our Dockerfile in line with best-practice recommendations in https://github.com/docker-library/official-images/blob/master/README.md#clarity

Specifically we should move all of the commands out of the ADD/RUN syntax and into the main Dockerfile.

We should also look to improve our build process.
I would recommend we look at what PHP, Postgres, and others have done and to have a shell script (update.sh) which takes a matrix of PHP versions, Base image versions (stretch at this time), and generates a Dockerfile in a folder format for each.

Prepare the 'php72' branch

PHP 7.2 is now RC5: time to prepare a branch/image for it.

Will look for the extensions required here, spare time permitted.

Revert #164 while the related problems are fixed.

In #164 we updated to:

  • ODBC 18 libraries.
  • php-sqlsrv 5.11

And it has caused a couple of problems:

  1. With ODBC 18, connections are encrypted by default, so we need a way to disable that encryption or to relax the certificate verifications. That's already fixed for 4.2dev (master) and will be also solved by MDL-77669 in stables. Both moodle-ci-runner and moodle-docker will use those new configuration abilities to solve the problem.
  2. Apart from the above, there are some consistent failures (PHPUnit till now) detected with the new libraries / php extension. See for example these runs: link1, link2. MDL-77678 has been created to fix that.

Most of the problems in #2 seem to happen within tests using ADOdb (and not our own drivers), so may be it's a matter of passing the new connection parameters to ADODb.

In any case, because of the 2 problems above and until they are fixed, this issue is about to revert #164 so we are back to the previous versions and back to green.

Ciao :-)

Edited: to add link to MDL-77678..

When deploying using traefik I get a forbidden error

I have my service as

  moodle:
    image: moodlehq/moodle-php-apache:7.1

      labels:
        - "traefik.main.frontend.rule=Host:moodle.XXX.com"
        - "traefik.main.frontend.whiteList.useXForwardedFor=true"
        - "traefik.main.port=80"
        - "traefik.enable=true"
        - "traefik.docker.network=traefik"

just to test it out, but I get
image

Consider installing MDK and its dependencies

Rather than creating my own Dockerfile for the sake of adding MDK to it, I'm suggesting to add MDK support to this one. The idea is to be able to connect to the container and run MDK commands as a developer typically does.

RUN apt-get install -y git
RUN apt-get install -y python-pip
RUN apt-get install python-dev libpq-dev libmysqlclient-dev
RUN pip install moodle-sdk

Ideally MDK should already be configured to point to the right folders, binaries, etc...

My ultimate goal is to run older versions of Moodle with older versions of PHP as I have to support them.

error when it's running

Fatal error: Method lang_string::__set_state() must take exactly 1 argument in /var/www/html/lib/moodlelib.php on line 10664

It doesn't matter what i open.. install.php, nothing etc..
I didn't change a single line in the moodle source code, just doing this to test something.

Any ideas?

Various helpers are polluting stdout, making the output of php scripts to become borked

Along the last months we have added a bunch of nice extras to the images (support for entrypoints, php.ini settings and extensions enable and disabling.

But there is a problem, because all them are sending to stdout information. Say:

Checking for php configuration in environment
Running PHP Configuration fetcher
Running entrypoint files from /docker-entrypoint.d
Found extension to enable:
...

And that makes simple execution of PHP scripts to become borked, for example:

$ docker run -it --rm moodlehq/moodle-php-apache:8.1-buster php -r 'echo PHP_VERSION;'
Running PHP Configuration fetcher
Checking for php configuration in environment

Running entrypoint files from /docker-entrypoint.d/*

Starting docker-php-entrypoint with php -r echo PHP_VERSION;
8.1.20

All that information shouldn't go to stdout (maybe stderr?) or, at very least, there should be an option to make all the initialisation quiet. Goal, to get exclusively the php execution results at stdout.

Ciao :-)

solr deprecated messages on PHP 8.1

Using moodle-php-apache-8.1 image I receive a lot of deprecated messages caused by solr, for example

Deprecated: Return type of SolrObject::offsetExists($property_name) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
Deprecated: Return type of SolrObject::offsetGet($property_name) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
Deprecated: Return type of SolrObject::offsetSet($property_name, $property_value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
Deprecated: Return type of SolrObject::offsetUnset($property_name) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
Deprecated: Return type of SolrDocument::offsetExists($fieldName) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
Deprecated: Return type of SolrDocument::offsetGet($fieldName) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
Deprecated: Return type of SolrDocument::offsetSet($fieldName, $fieldValue) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
Deprecated: Return type of SolrDocument::offsetUnset($fieldName) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
Deprecated: Return type of SolrDocument::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
Deprecated: Return type of SolrDocument::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
Deprecated: Return type of SolrDocument::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
Deprecated: Return type of SolrDocument::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
Deprecated: Return type of SolrDocument::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
Deprecated: SolrDocument implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in Unknown on line 0
Deprecated: SolrModifiableParams implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in Unknown on line 0
Deprecated: SolrQuery implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in Unknown on line 0
Deprecated: SolrDisMaxQuery implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in Unknown on line 0

when running phpunit inside the docker container. Similar warnings appear right when starting up the container.

Could this maybe fixed by updating the solr extension?

Add PHP 8.1 images

This issue is to track adding PHP 8.1 images. At the time of creating this, that version is still under development and will be released later (December 2021).

Till then we'll be building rc/beta images to monitor what's breaking/missing and, also to enable various tests and checks to be performed in advance.

Ongoing work happening @ 8.0-buster...stronk7:8.1-buster

How to configure the moodledata directory to a directory on my host?

I managed to run this Moodle and everything is working fine, acessing a external database. But now I am trying to configure moodle to point the container' directory /var/www/moodledata to a directory on my host, let's say, /host/moodledata.

Ex:

This work (default moodledata inside the container):

$ docker run --name moodle402 -p 8080:80 -v $PWD:/var/www/html moodlehq/moodle-php-apache:7.4

This no work and I don't know why. Moodle show the error: error/An error occurred whilst communicating with the server

$ docker run --name moodle402 -p 8080:80 \
-v $PWD:/var/www/html \
-v /host/moodledata:/var/www/moodledata \
moodlehq/moodle-php-apache:7.4

My Moodle config:

$CFG->dataroot  = '/var/www/moodledata';

The directory /host/moodledata has full permissions (777).

So, is there some "right" way to have moodledata on my host?

LDAP and Debian Bullseye

Hello Everyone,
I didn't test it by myself, just sharing something that could affect the LDAP tests here when using the Bullseye option and running MOODLE_DOCKER_PHPUNIT_EXTRAS=true:

Oh, in buster the curl package depends on libcurl4 which depends on libldap-2.4-2 which depends on libldap-common.
While in bullseye, the libldap-2.4-2 package only recommends libldap-common.

It looks like we should add libldap-common to PACKAGES_LDAP or wait for docker-library/php#1228.

HTH,
Matteo

How To Enable igbinary Serializers for Redis?

Hi all,

I am running Moodle 4.2.1 on Docker Swarm Cluster by using moodlehq/moodle-php-apache:8.1 based container image.

This container runs PHP 8.1 with the available serializers for Redis are: php and json only.

php -i | grep -A 4 'Redis Support' 
Redis Support => enabled
Redis Version => 5.3.7
Redis Sentinel Version => 0.1
Available serializers => php, json
02-A-no-redis-igbinary-support-on-moodlextc

Expected Serializers

The available serializers for Redis are: php, json, and igbinary:

Available serializers => php, json, igbinary
01-A-enabled-redis-igbinary-support-on-moodlegn

What do you suggest to solve the issue?

Any helps is very much appreciated.

Thank you in advance.

moodlehq:7.4 course management

Hi.

I stumbled upon the problem with course backup and deletion on moodlehq:7.4.

On backup operation the page fails to load and the following record appears in php log:
[core:notice] [pid 1] AH00052: child pid 19 exit signal Segmentation fault (11)

On delete operation site page fails to load and the following record appears in php log:
[core:notice] [pid 1] AH00052: child pid 23 exit signal Segmentation fault (11)

Reverting back to moodlehq:7.3 instantly solved my problems.

Support armv7l

It'd be nice to support armv7l so can run on rpi4 (at least for simple dbs)

Add bookworm images for php >= 81 images and make them the default ones

Our upstream images (docker "official" ones) only support 2 debian versions for PHP version.

Recently, for php >= 81, they stopped building Debian buster images and started with Debian bookworm instead (see docker-library/php#1416). So current images look as follow:

So we need to:

  • Create bookworm variants for 8.1, 8.2 and dev.
  • Verify they work ok.
  • Make them the default ones for those branches (currently default is bullseye).

Ciao :-)

Can we have gs at /usr/bin/gs instead of /usr/local/bin/gs ?

Moodle's default pathtogs setting is /usr/bin/gs but this image has gs at /usr/local/bin/gs. This means, for instance, that PDF annotation does not work until one updates the system paths. Is there some way that we can have the expected path?

Docs don't explain how to use!

Ran the image and also the moodlehq/moodle-db-oracle-r2 image, ports mapped, volume mapped, but I get a "403 Forbidden" when trying to access port 8080. Is there a config file that needs to be set in the current directory?

Update to use 'stretch' images

We should be able to update to use the apache-stretch images available for 7.0, and 7.1.
This will allow us to test things like sassc (currently untested as sassc is not available on jessie)

Adding more php-extension modules

Hi all, wanted to check if you were open to PR's adding another php-extension module, specifically in this case the imap module.

This is used in a few of our plugins and would be useful to have by default in the upstream container.

Roughly, in each of the supported environments

RUN apt update && apt install -y libc-client-dev libkrb5-dev && rm -r /var/lib/apt/

RUN docker-php-ext-configure imap --with-kerberos --with-imap-ssl && docker-php-ext-install imap

will attempt to integrate with the setup script that manages the extensions.

Install php-excimer

Adding https://github.com/catalyst/moodle-tool_excimer to our build and it requires this extension, running our unit testing pipelines through https://github.com/moodlehq/moodle-docker so seems fitting to suggest to add here.
Looks to be a pretty nice tool to monitor Moodle, Cat AU / Brendan & team have implemented.

My quick attempt at adding has failed - aspark21@7e3d41e - https://github.com/aspark21/moodle-php-apache/runs/6594297672?check_suite_focus=true

Will keep digging tomorrow and see if I can get a working pull request for it

Create all locales instead of only en_US and en_AU

Hi @stronk7

What do you think, can we create all locales in the image? Or shall we dynamically add them within the moodle-docker compose script as environment variable?

Possible way would be to run this command cp /usr/share/i18n/SUPPORTED /etc/locale.gen instead of these two https://github.com/moodlehq/moodle-php-apache/blob/master/root/tmp/setup/php-extensions.sh#L39-L40.

Right now we've extended these lines and we're using our own image (https://github.com/ffhs/moodle-php-apache/commit/3bebee44ebc763f89f1bee4ccdd5d226e812fdf9).

Greets
Adrian

Add sassc

Since 3.5 we offer building of themes using sassc instead of the PHP compiler (MDL-61394).

This patch installs the sassc C compiler which we support so that we can run unit tests.

Requirements for mlbackend_python tests missing

It'd be great to include the python library required to run the mlbackend_python tests.

There were 11 skipped tests:

1) core_analytics_prediction_testcase::test_ml_training_and_prediction with data set "no_splitting-\mlbackend_python\processor" ('\core\analytics\time_splittin...itting', 0, '\mlbackend_python\processor')
Skipping \mlbackend_python\processor as the predictor is not ready.

/var/www/html/analytics/tests/prediction_test.php:141
/var/www/html/lib/phpunit/classes/advanced_testcase.php:80

Unpin the 80, 81 and 82 images once links are back to work

With latest php images, based on 28 March 2023 upstream ones, apache has stopped to follow links. We use that for parallel behat reruns and now all them are failing with "behat site not available".

Because of that, we have pinned the php80, php81 and php82 images to use the previous versions from few days earlier. With those images continue working ok. See, for example, this, for php81:

stronk7@a89efcc

Also, an issue has been created in the php docker images upstream repo:

docker-library/php#1393

We also need to verify why that has stopped working. Smells to permissions or something similar causing the configuration not to be read any more (this is a blind bet).

In any case, once we have been able to fix the problem ourselves, or when the upstream images are back to work... we have to "unpin" those 6 images again. This issue is about that.

Ciao :-)

HEADs UP: This repo has moved from "master" to "main"

Hi all,

today (27th Dec 2023), we have proceeded to rename the "master" branch of this repository to "main".

You can find more details about the migration @ https://tracker.moodle.org/browse/MDLSITE-7418

For some guidance about how to proceed with your clones you can follow the information that GitHub provides in the home page of the repo and, also, take a look to this (still draft!) document:

https://gist.github.com/stronk7/d007be57062ebef2dd6549010954a378
(you're welcome to help amending it with your experiences, feel free to comment there)

Once ready, the document will be moved to https://moodledev.io

Sorry for the trouble and ciao :-)

PS: This issue will be closed in a few weeks.

CURL error: Connection timed out Issue when Using MNet

In order to MNet to be working properly in Moodle site (using this moodlehq/moodle-php-apache Docker image) the PHP must be compiled with XMLRPC Support: --with-xmlrpc in Configure Command. Please see It doesn't work. What do I do now?.

  • make sure xmlrpc is installed. Please go to your phpinfo page and search for --with-xmlrpc. If your php has not been compiled with xmlrpc then you need to address that! At present it appears that PEAR xmlrpc will not work.

I got the output of the php command bellow: --with-xmlrpc is not enabled (by default) in the moodlehq/moodle-php-apache image. Is it (please CMIIW)?

$ php -i | grep 'Configure \Command'

Configure Command =>  './configure'  '--build=x86_64-linux-gnu' '--with-config-file-path=/usr/local/etc/php' '--with-config-file-scan-dir=/usr/local/etc/php/conf.d' '--enable-option-checking=fatal' '--with-mhash' '--with-pic' '--enable-ftp' '--enable-mbstring' '--enable-mysqlnd' '--with-password-argon2' '--with-sodium=shared' '--with-pdo-sqlite=/usr' '--with-sqlite3=/usr' '--with-curl' '--with-iconv' '--with-openssl' '--with-readline' '--with-zlib' '--disable-phpdbg' '--with-pear' '--with-libdir=lib/x86_64-linux-gnu' '--disable-cgi' '--with-apxs2' 'build_alias=x86_64-linux-gnu'

If it is not enabled by default (in Configure Command), how to rebuild the image with this: --with-xmlrpc ?

Thank you in advance.

MoodleSite-admin-phpinfo php--2023-10-25

How to Provide Moodle Cron?

I could not find the Moodle Cron when using the container image: moodlehq/moodle-php-apache.

$ crontab -l
bash: crontab: command not found

Should we make it by customizing the Dockerfile?

Any suggestions?

Thank you in advance.

Add database

Then this would be a usable development/test environment for moodle

Forbidden You don't have permission to access / on this server.

I have ran
docker run --name web0 -p 8080:80 -v PWD:/var/www/html moodlehq/moodle-php-apache:7.1

then tried to access on http://localhost:8080/

but getting this error
Forbidden
You don't have permission to access / on this server.
Apache/2.4.25 (Debian) Server at localhost Port 8080

can somebody please guide me step by step??
I'm very new to docker and moodle. Im doing it for my assignment

thanks

Set php.ini based on environment variables

Following from #162 it would be good to include an init script (perhaps in a different location so as not to conflict) which allows the setting of php.ini settings from environment variables. For example:

docker run \
  -e PHPINI-upload_max_filesize=200M \
  -e PHPINI-post_max_size=208M \
  ...

We can fetch all env vars matching a prefix in bash and create a stub php.ini to place them into.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.