Docker PowerMTA 5

  • Thread starter sysAuditing
  • Start date
S

sysAuditing

  • #1
Hi,
i want to implement a Dockefile for PowerMTA 5.
Do you think is a good idea or not?
How Dockerfile should be?

Any help will be appreciated.

Thank you
 
irwan94

irwan94

Verified
  • #2
thanks
 
S

sysAuditing

  • #3
Does anyone here have any answer?

Thanks
 
D•Jass

D•Jass

Staff member
Verified
  • #4
Does anyone here have any answer?

Thanks
I think it's possible, should be something like this:

# Use a lightweight base image
FROM centos:7

# Set environment variables
ENV PMTA_VERSION=5.x.x
ENV PMTA_LICENSE_KEY=your_license_key_here

# Install required dependencies
RUN yum -y update && \
    yum -y install wget tar && \
    yum clean all

# Add PowerMTA package
ADD https://your-pmta-download-url/pmta-$PMTA_VERSION.tar.gz /tmp/

# Install PowerMTA
RUN tar -xvzf /tmp/pmta-$PMTA_VERSION.tar.gz -C /tmp && \
    cd /tmp/pmta-$PMTA_VERSION && \
    ./install.sh && \
    rm -rf /tmp/pmta*

# Copy your custom configuration files
COPY pmta/config/ /etc/pmta/

# Expose necessary ports
EXPOSE 25 587 8080

# Define volumes for persistent data
VOLUME ["/var/spool/pmta", "/var/log/pmta"]

# Start PowerMTA
CMD ["/etc/init.d/pmta", "start"]
 
S

sysAuditing

  • #5
I think it's possible, should be something like this:

# Use a lightweight base image
FROM centos:7

# Set environment variables
ENV PMTA_VERSION=5.x.x
ENV PMTA_LICENSE_KEY=your_license_key_here

# Install required dependencies
RUN yum -y update && \
    yum -y install wget tar && \
    yum clean all

# Add PowerMTA package
ADD https://your-pmta-download-url/pmta-$PMTA_VERSION.tar.gz /tmp/

# Install PowerMTA
RUN tar -xvzf /tmp/pmta-$PMTA_VERSION.tar.gz -C /tmp && \
    cd /tmp/pmta-$PMTA_VERSION && \
    ./install.sh && \
    rm -rf /tmp/pmta*

# Copy your custom configuration files
COPY pmta/config/ /etc/pmta/

# Expose necessary ports
EXPOSE 25 587 8080

# Define volumes for persistent data
VOLUME ["/var/spool/pmta", "/var/log/pmta"]

# Start PowerMTA
CMD ["/etc/init.d/pmta", "start"]
Thanks for your help.
But do you think is docker good for PowerMTA use case?
Thank you
 
Top