amazon-ecs-agent
amazon-ecs-agent copied to clipboard
Add support for Custom Network and Network Alias settings
Summary
Add support for Custom Network and Network Alias settings. It's useful when running more that two containers that should communicate via local network.
Implementation details
This patch provide two new configuration variables:
-
ECS_OVERRIDE_BRIDGE_NETWORK_NAME
- when set, all containers created with NetworkType bridge will be set to this network name. This is equivalent of--net <name>
parameter ofdocker run
command -
ECS_ADD_CONTAINER_NAME_AS_NETWORK_ALIAS
- when set to true, and when container is using custom network - then container name will be assigned as a network alias. This is equivalent of--network-alias <container-name>
parameter ofdocker run
command.
Testing
New tests cover the changes: no
Description for the changelog
Enhancement - Create containers in a custom network and register their name as network alias
Licensing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
@fierlion I've fixed tests - now they should pass, however do not cover a new functionality
Thanks for the PR, however this is not a bug fix but an entirely new feature request. It has to go through proper channels before any CRs. Please hold.
Thanks for the PR, however this is not a bug fix but an entirely new feature request. It has to go through proper channels before any CRs. Please hold.
I've never marked it as a bugfix - we maintain this patch for our purposes, and I asked our Account Manager if we can propose it as a change. AFAIK your team should get a separate email/message about it.
We use this functionality. with ECS Anywhere aka External service.