2

I can't find any documentation on the startup order (probably I'm just not looking in the right places).

On the Docker side there's all the stuff in the Dockerfile which gets executed together and then the CMD entry which is run after to actually start the server.

What I want to know is when do commands in ebextensions get run relative to this?

Is it before any of the Dockerfile stuff happens? after the bulk of the Dockerfile stuff but before CMD or after all of it?

1 Answers1

1

This page is useful: Customizing Software on Linux Servers | AWS Elastic Beanstalk

Under "Commands" it says "run before the application and web server are set up and the application version file is extracted"

Under "Container Commands" it says "run after the application and web server have been set up and the application version archive has been extracted, but before the application version is deployed."

From experimenting I think it goes like this:

  1. Run ebextensions Commands
  2. Build Docker image as 'aws_beanstalk/staging-app'
  3. Run ebextensions Container Commands
  4. Rename the image to aws_beanstalk/current-app
  5. Start the image

I can successfully call run on the staging-app image from container commands, which is what I was after.

chicks
  • 3,793
  • 10
  • 27
  • 36