epicsoft/unlighthouse

By epicsoft

Updated 3 days ago

Unlighthouse Docker image based official node LTS image

Image
Integration & delivery
Developer tools
Monitoring & observability
0

10K+

epicsoft/unlighthouse repository overview

Unlighthouse

This Docker image is managed and kept up to date by epicsoft LLC.

Unlighthouse based on official node image.

This Docker image installs applications Unlighthouse and Wrangler.

Description

Unlighthouse is a tool to scan your entire site with Google Lighthouse. Open source, fully configurable with minimal setup.

The reports are generated by default under /unlighthouse. These can, for example, be mapped to a volume or local path -v /media/unlighthouse:/unlighthouse.

Versions

latest based on unlighthouse:latest - build weekly

Examples

Show help
docker run --name unlighthouse --rm -it epicsoft/unlighthouse:latest
Use built-in server to display the report
Report for mobile device (default)
docker run --name unlighthouse --rm -it \
  -p 5678:5678 \
  epicsoft/unlighthouse:latest \
    unlighthouse --site="https://example.com"

The Docker container remains active with a running built-in server and can be reached under http://localhost:5678/. The Docker container must be stopped e.g. with ctrl+c or docker stop unlighthouse.

Report for desktop device
docker run --name unlighthouse --rm -it \
  -p 5678:5678 \
  epicsoft/unlighthouse:latest \
    unlighthouse --site="https://example.com" --desktop
Create reports

Static reports can be created automatically, for example in a CI/CD, and uploaded to a central server.

See detailed description on the Unlighthouse website: https://unlighthouse.dev/guide/guides/generating-static-reports

Please note that unlighthouse-ci is used here for execution

Create interactive HTML reports locally
docker run --name unlighthouse --rm -it \
  -v /media/unlighthouse:/unlighthouse \
  epicsoft/unlighthouse:latest \
    unlighthouse-ci --site="https://example.com" --build-static
Create interactive HTML reports on Clodflare

Required steps for Cloudflare see: https://developers.cloudflare.com/workers/wrangler/ci-cd/

Create a new project at Cloudflare - execute only once.

docker run --name unlighthouse --rm -it \
  -e CLOUDFLARE_ACCOUNT_ID=<YOUR CF ACCOUNT ID> \
  -e CLOUDFLARE_API_TOKEN=<YOUR CF API TOKEN> \
  -e WRANGLER_SEND_METRICS=false \
  epicsoft/unlighthouse:latest \
    wrangler pages project create '<YOUR PROJECT NAME>' --production-branch=main

Automatically create a current version, e.g. with a CI/CD.

docker run --name unlighthouse --rm -it \
  -e CLOUDFLARE_ACCOUNT_ID=<YOUR CF ACCOUNT ID> \
  -e CLOUDFLARE_API_TOKEN=<YOUR CF API TOKEN> \
  -e WRANGLER_SEND_METRICS=false \
  epicsoft/unlighthouse:latest \
    sh -c "unlighthouse-ci --site='https://example.com' --build-static \
      && wrangler pages deploy /unlighthouse/reports \
        --project-name=<YOUR PROJECT NAME> --branch=main"

The report is automatically uploaded to Cloudflare and is immediately available, usually under <YOUR PROJECT NAME>.pages.dev.

Create more reports

Other reports such as CSV, JSON and LHCI can be generated.
Take a look at the Unlighthouse documentation: https://unlighthouse.dev/guide/guides/generating-static-reports
The commands can be easily adapted to the Docker container.
If you have any questions, please create a ticket or contact us directly.

Docker-Compose example
version: "3.8"
services:

  unlighthouse:
    image: epicsoft/unlighthouse:latest
    container_name: unlighthouse
    command: "unlighthouse --site='https://example.com' --dekstop"
    ports:
      - 5678:5678

The Docker container can be accessed under http://localhost:5678.

License

MIT License see LICENSE

Please note that the MIT license only applies to the files created by epicsoft LLC. Other software may be licensed under other licenses.

Tag summary

Content type

Image

Digest

sha256:3e593ef13

Size

1010.4 MB

Last updated

3 days ago

docker pull epicsoft/unlighthouse