Build the Flogo Application Docker Image

Build the application docker image by extending the runtime base docker image and copying the app binary into it. To do this:

Procedure

  1. Tag the Runtime base docker image. For example, use flogo-runtime:<version>
  2. Create a Docker file in the directory containing the Flogo app binary and add the two commands displayed below.
    FROM flogo-runtime:<version> 
    ADD <FLOGO_APP_BINARY_NAME> flogoapp
    Note: As seen above, you must configure the application binary as flogoapp before you can run it.
    For example:
    FROM flogo-runtime:2.4.0 
    ADD hello_world-linux_amd64 flogoapp
  3. Run the docker build command to build the app docker image.
    docker build -t <APP_IMAGE_NAME>:<TAG>
  4. Push the app docker image to ECR. For more information about ECR, see the ECR documentation.
  5. While configuring the task definition, the policy (shown below) must be set and attached to the IAM role configured for the task. Otherwise, the app will not start:
    {  
      "Version":"2012-10-17",
      "Statement":[
         {
           "Action":[
             "aws-marketplace:RegisterUsage"
          ],
           "Effect":"Allow",
           "Resource":"*"
          }
       ]
    }
    

    See the Amazon website for more information regarding the use and licensing of the Amazon Linux Docker Image.