---
title: "Run Lighthouse in Docker · Unlighthouse"
meta:
  "og:description": "Run Unlighthouse site-wide Lighthouse scans in Docker containers. Dockerfile examples and CI/CD configuration."
  "og:title": "Run Lighthouse in Docker · Unlighthouse"
  description: "Run Unlighthouse site-wide Lighthouse scans in Docker containers. Dockerfile examples and CI/CD configuration."
---

**Guides**

# **Run Lighthouse in Docker**

[Copy for LLMs](https://unlighthouse.dev/guide/guides/docker.md)

Run Unlighthouse in Docker containers for consistent CI/CD environments. Docker requires special Puppeteer configuration due to sandboxing restrictions.

Docker support is community-maintained and experimental. Use the CI integration for best results.

## [Unlighthouse Config](#unlighthouse-config)

It's recommended you only use the `@unlighthouse/ci` with Docker. Hosting the client does not have known support.

You will need to remove the Chrome sandbox in a Docker environment, this will require using an `unlighthouse.config.ts` file.

```
import { defineUnlighthouseConfig } from 'unlighthouse/config'

export default defineUnlighthouseConfig({
  puppeteerOptions: {
    headless: true,
    args: [
      '--no-sandbox',
      '--disable-setuid-sandbox',
      '--disable-gpu',
      '--ignore-certificate-errors',
    ],
  },
})
```

If you're using the `unlighthouse` binary instead of the CI integration, then you will need to tell Unlighthouse not to use the server and close when the reports are finished.

```
export default defineUnlighthouseConfig({
  server: {
    open: false,
  },
  hooks: {
    'worker-finished': async () => {
      process.exit(0)
    },
  },
})
```

## [Docker File](#docker-file)

Please see the following community repos:

- [**indykoning—Unlighthouse Docker**](https://github.com/indykoning/unlighthouse-docker)

[Edit this page](https://github.com/harlan-zw/unlighthouse/edit/main/docs/1.guide/guides/docker.md)

[Markdown For LLMs](https://unlighthouse.dev/guide/guides/docker.md)

**Did this page help you? **

Anything that could be done better? :)

Help us improve this page. You can [edit this page](https://github.com/harlan-zw/unlighthouse/edit/main/docs/1.guide/guides/docker.md) on GitHub or provide anonymous feedback below.

[**Device Configuration** Run Unlighthouse in desktop mode with --desktop flag or device: 'desktop' config. Configure mobile/desktop emulation, viewports, and throttling.](https://unlighthouse.dev/guide/guides/device) [**Dynamic Sampling** Automatically sample similar pages to reduce scan time for sites with many similar URLs like blogs or e-commerce.](https://unlighthouse.dev/guide/guides/dynamic-sampling)

**On this page **

- [Unlighthouse Config](#unlighthouse-config)
- [Docker File](#docker-file)