From 214bfa4a03c480d4b978935a347c077cbe6efd42 Mon Sep 17 00:00:00 2001 From: Moises Rodriguez Date: Tue, 20 Jul 2021 19:37:27 -0500 Subject: [PATCH 1/2] Document Rack ImagePullBehavior Document AWS ECS_IMAGE_PULL_BEHAVIOR https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-config.html --- docs/reference/rack-parameters.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/reference/rack-parameters.md b/docs/reference/rack-parameters.md index 2581be6f..46999c9c 100644 --- a/docs/reference/rack-parameters.md +++ b/docs/reference/rack-parameters.md @@ -143,7 +143,14 @@ Set this value to the hostname (or IP address) and port number of an HTTP proxy | Default value | ** | For more information, see [HTTP Proxy Configuration](http://docs.aws.amazon.com/AmazonECS/latest/developerguide/http_proxy_config.html) in the AWS docs. + +### ImagePullBehavior +By default the ECS agent always pulls the Docker image from its remote registry when starting a task. If you are using a well designed image tagging scheme such as a new image tag for each release of your application this behavior is unnecessary. The default behavior only benefits you if you are doing something like overwriting your `latest` image tag with new content for each application release. Since using the `latest` tag is an anti-pattern anyway, you are likely using a unique image tag for each application release and can modify your image pull behavior. + +| Default value | `default` | +| Allowed values | `default`, `always`, `once`, `prefer-cached`| + ### InstanceBootCommand A single line of shell script to run (as root) as a cloud-init command early during instance boot. From 0648621daeca3dcc480465102554b0d0716af69b Mon Sep 17 00:00:00 2001 From: Moises Rodriguez Date: Fri, 24 Sep 2021 13:30:22 -0500 Subject: [PATCH 2/2] Update description for ECS_IMAGE_PULL_BEHAVIOR --- docs/reference/rack-parameters.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/rack-parameters.md b/docs/reference/rack-parameters.md index 46999c9c..dc874a68 100644 --- a/docs/reference/rack-parameters.md +++ b/docs/reference/rack-parameters.md @@ -146,7 +146,7 @@ For more information, see [HTTP Proxy Configuration](http://docs.aws.amazon.com/ ### ImagePullBehavior -By default the ECS agent always pulls the Docker image from its remote registry when starting a task. If you are using a well designed image tagging scheme such as a new image tag for each release of your application this behavior is unnecessary. The default behavior only benefits you if you are doing something like overwriting your `latest` image tag with new content for each application release. Since using the `latest` tag is an anti-pattern anyway, you are likely using a unique image tag for each application release and can modify your image pull behavior. +By default the ECS agent always pulls the Docker image from its remote registry when starting a task. You can configure it's behaviour with the following options documented [here](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-config.html). | Default value | `default` | | Allowed values | `default`, `always`, `once`, `prefer-cached`|