Launch non-www material on the Docker Elastic Bean Stitch container

I want to run an SMTP server in a Docker container in Elastic Beanstalk, so in my Docker file I found port 25 (and other ports)

EXPOSE 25

I also edited the beanstalk download balancer (using EC2 web admin) and added port 25 to it:

| LB Protocol | LB Port | Instance Protocol | Instance Port | SSL |
|    TCP      |   25    |        TCP        |        25     | N/A |
....

And edited the instance security group to allow incoming TCP traffic to port 25 (to allow all locations to connect directly to the instance).

It doesn't seem to work. If I use the same Docker file in Virtualbox (using the option -p 25:25), I can connect to port 25 through the host machine and listen to the SMTP server. If I start the container in Elastic Beanstalk using the above configuration, I cannot connect to port 25 without using load balancing or directly EC2 instance.

Any ideas what I'm doing wrong here?

+4
source share
1 answer

, - EC2, , , EC2 .

? "01-elb.config" .ebextensions :

option_settings:
    - namespace: aws:cloudformation:template:parameter
      option_name: InstancePort
      value: 25

Resources:
    AWSEBLoadBalancer:
        Type: AWS::ElasticLoadBalancing::LoadBalancer
        Properties:
            Listeners:
                - InstancePort: 25
                  LoadBalancerPort: 80
                  Protocol: TCP
                - InstancePort: 25
                  LoadBalancerPort: 25
                  Protocol: TCP
            AvailabilityZones:
                - us-west-2a
                  us-west-2b
                  us-west-2c
            HealthCheck:
                Timeout: 5
                Target: TCP:25
                Interval: 30
                HealthyThreshold: 3
                UnhealthyThreshold: 5

YAML, . ( "aws: cloudformation: template: parameter", "InstancePort" ) 25, , , 25 .

, Elastic Beanstalk, , , 25. , .

ebextensions . .ebextensions/01-elb.config appsource? , .

+2

All Articles