jetmore / swaks

Swaks - Swiss Army Knife for SMTP
http://jetmore.org/john/code/swaks/
GNU General Public License v2.0
848 stars 86 forks source link

add Dockerfile for Docker support #31

Open iambryancs opened 3 years ago

iambryancs commented 3 years ago

Hi John, this PR adds support for Docker. Very useful in my case where I do tests on dev k8s cluster. Also useful on any system with Docker that don't want to deal with installing CPAN/Perl and other extensions like Net-SSLeay.

Usage:

docker run --rm -ti jetmore/swaks [OPTIONS]

Example:

# test
docker run --rm -ti jetmore/swaks \
  -f foo@bar.com \
  -t foo@baz.com \
  -s localhost

# help
docker run --rm jetmore/swaks --help
mathieu-aubin commented 2 years ago

considering this is a single file, standalone... do you think it is needed to have such docker setup?

jetmore commented 2 years ago

considering this is a single file, standalone... do you think it is needed to have such docker setup?

The script itself is only one file, but there are optional perl modules (as referenced by the ticket creator) that could be pulled in. Also, I imagine in some deploy environments that are optimized for Docker it would be nice to have even for a single file. I haven't thought yet about how to formally include this in the project but I support the general idea.

mathieu-aubin commented 2 years ago

fair enough