---
title: Docker
slug: docs/docker
icon: {"faIcon":"fa-brands fa-docker"}
docTags: 
createdAt: 2024-04-17T16:41:25.706Z
---

# Running in Docker

The following command will allow you to run TruffleHog Enterprise as a daemon in Docker. The last line contains the arguments passed to TruffleHog (the scan subcommand followed by the config arguement). Everything prior to that are flags for Docker itself.

:::CodeblockTabs
Basic daemon

```shell
docker run --net=host --restart=unless-stopped \
  -v $(pwd)/YOUR_CONFIG.yaml:/tmp/YOUR_CONFIG.yaml \
  -it us-docker.pkg.dev/thog-artifacts/public/scanner:latest \
  scan --config=/tmp/YOUR_CONFIG.yaml
```
:::

## Using the host certificate authority

If your environment uses a custom certificate authority, and it is installed on the host machine, you can mount it into the container for use with the following Docker flags:


:::CodeblockTabs
Custom PKI

```shell
-v /etc/pki:/etc/pki
```
:::

The location of your custom CA may vary and need adjustment.

## Using a HTTP proxy

If your environment requires a HTTP proxy for egress, you can specify it with the following Docker flags:

:::CodeblockTabs
Basic daemon

```shell
--env HTTP_PROXY"http://127.0.0.1:8200" \
--env HTTPS_PROXY="http://127.0.0.1:8433" \
--env NO_PROXY="localhost,127.0.0.1,localaddress,.localdomain.com"
```
:::

You will likely need to adjust the hosts for your environment.
