Simple containerised mock of a MoodleNet instance for testing purposes. This mock must use HTTPS and supports both localhost TLS (host-to-container TLS) and containerised TLS (container-to-container TLS).
Certs must be generated outside the container and made accessible to the running container via a docker volume. This should support both simple localhost use cases and docker compose environments.
127.0.0.1 localhost moodlenet.test
./build.sh localhost moodlenet.test
docker run -di -p 443:443 -v "$(pwd)/certs":/opt/ssl/certs moodlenet-mock
docker build -t moodlenet-mock:latest .
docker run -p 443:443 -v "$(pwd)/certs":/opt/ssl/certs moodlenet-mock
Running the app locally can be useful for things like debugging, since the container isn't currently set up for xdebug. This uses the build script only to generate the certs. Though the container is built too, it's not needed.
./build.sh localhost moodlenet.test
cd app
symfony check:requirements
composer install
symfony server:start --port=8080 --p12=../certs/moodlenet.p12
Content type
Image
Digest
sha256:33e39054c…
Size
213.7 MB
Last updated
about 3 years ago
docker pull moodlehq/moodlenet_mock