parsedmarc icon indicating copy to clipboard operation
parsedmarc copied to clipboard

Seeking documentation for docker run(ning) image created from Dockerfile

Open hesco opened this issue 2 years ago • 3 comments

So far, all I am seeing is:

# docker run 597a73d6d15a 
  ERROR:cli.py:774:You must supply input files or a mailbox connection

Without the general.impa_host line below, I also get:

# docker run 597a73d6d15a 
ERROR:cli.py:774:You must supply input files or a mailbox connection

poking about a bit in the code suggested that this might be useful, but it does not seem to have moved the needle.

/domainaware-parsedmarc/parsedmarc# git diff ci.ini 
diff --git a/ci.ini b/ci.ini
index 3e35e9c..e14c249 100644
--- a/ci.ini
+++ b/ci.ini
@@ -2,6 +2,7 @@
 save_aggregate = True
 save_forensic = True
 debug = True
+imap_host=imap.dreamhost.com
 
 [elasticsearch]
 hosts = http://localhost:9200

Am I on the right path? Can an imap connection be configured in the ci.ini file?

Should I be passing it in as environmental variables to the docker run command? How is this accomplished, please?

If you can provide me enough clues to get me going, I would be happy to adapt them into a patch to your README.md file.

hesco avatar Oct 08 '22 23:10 hesco

I found the example at docs/source/example.ini, but copying the imap stanza into the ci.ini file does not change the outcome saying my imap_host = None.

hesco avatar Oct 08 '22 23:10 hesco

the docker run code does not seem to be reading the ini file I hope it is. Not sure where it is looking for its configuration.

hesco avatar Oct 08 '22 23:10 hesco

I haven't tested this, but it appears that by default the Docker image starts parsedmarc without arguments. The CLI help includes an overview of options. For you the -c option to specify the path to the configuration file (explained in the section below the CLI help) is probably what you need.

You may need to map the path on the Docker host (for example, ${PWD}/my_parsedmarc_config.ini) to a path in the Docker container. This may work (or not): docker run -v ${PWD}/my_parsedmarc_config.ini:/etc/parsedmarc.ini parsedmarc_image parsedmarc -c /etc/parsedmarc.ini.

bencomp avatar Aug 22 '23 20:08 bencomp