Docker
4 min
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.
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.yamlUsing 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:
-v /etc/pki:/etc/pkiThe 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:
--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.