Google Lighthouse in Docker Image
533
Repository -- Exemple d utilisation
Lighthouse analyse les applications Web et les pages Web, en collectant des mesures de performances modernes et des informations sur les meilleures pratiques des développeurs.
Quelques exemples d'utilisation de Google Lighthouse in Docker Image.
Executer un test et récuperer le rapport au format json.
docker run --rm -v /local/path/on/host:/tmp rdrit/lighthouse https://example.com --output json --output-path /tmp/lighthouse-report.json
Executer un test et récuperer le rapport au format html.
docker run --rm -v /local/path/on/host:/tmp rdrit/lighthouse https://example.com --output html --output-path /tmp/lighthouse-report.html
Executer un test et récuperer le rapport au format json et html.
docker run --rm -v /local/path/on/host:/tmp rdrit/lighthouse https://example.com --output json --output html --output-path /tmp/lighthouse-report
Quand plusieurs format de sortie sont configurés, l'extension du fichier est ajouté automatiquement
Par défaut, les tests sont effectués en simulant un périphérique mobile (téléphone), pour simuler un ordinateur il faut ajouter l'option --preset=desktop
docker run --rm -v /local/path/on/host:/tmp rdrit/lighthouse https://example.com --preset=desktop --output json --output-path /tmp/lighthouse-report.json
La génération de rapport par Lighthouse utilise beaucoup de données en mémoire partagée (shared memory /dev/shm) et si cette mémoire est trop faible, le rapport ne va pas au bout de la génération, on peut ajuster la mémoire en utilisant le paramètre --shm-size.
docker run --rm --shm-size=2gb -v /local/path/on/host:/tmp rdrit/lighthouse https://example.com --preset=desktop --output json --output-path /tmp/lighthouse-report.json
Content type
Image
Digest
sha256:468103ee0…
Size
715.8 MB
Last updated
over 1 year ago
docker pull rdrit/lighthouse:main