aws / aws/containers-roadmap

setting the container hostname with the taskarn (docker run -h <taskarn> ...)

Open
#340 4 comments 1 reaction 0 assignees View on GitHub
ECS Proposed
Dominant language
Shell
Stars
5.4k
Forks
334
PR merge metrics
No merged PRs in 30d

Description

### Summary
Today the hostname inside a container is a random number (docker image),
Is it possible to have ecs-agent setup the contaienr hostname with the taskarn of the task ?
(same as running docker run -h ...)

### Description
We have newrelic agent monitoring our application inside the containers and today they use the hostname to report metric to the newrelic server.
In our graph with have a bunch of metric with random id (docker image id) as name, not very useful
to know on which task is it or on which real host is it running.
If we can have the taskarn as hostname in the contaienr when the container start we would see taskarn in our graph and we could easily pinpoint the bad task (and even automate some work, like killing a specific task in aws ecs base on newrelic alert)

The TaskARN->Hostname could be enable by a flag in ecs,config file.

Contributor guide

Open the contributing guide

Research direction

The issue names no files, tests, or entry points. Begin by reviewing ECS agent container startup behavior and Docker's `-h` hostname option, then determine how a configuration flag could use the task ARN as the container hostname; done means the behavior is specified and validated for ECS tasks.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, docker
Domain
cloud
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.