Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

344
Views
Can I update the hostname of a Docker Node?

Currently all my nodes have the name ubuntu-yakkety.

docker node ls

ID                           HOSTNAME        STATUS  AVAILABILITY  MANAGER STATUS
d7rdq4n4dmrkhyz4ov7ldr31e    ubuntu-yakkety  Ready   Active        
iddxyuic586lnla6aw700rdwc    ubuntu-yakkety  Ready   Active        
zxcr1yvveccj4soyh2hsjjebk *  ubuntu-yakkety  Ready   Active        Leader

In order to create better filters that would be great if I could update node's hostname as node-01 node-02 ... node-99

However, I couldn't find any way to accomplish it in the documentation.

1) Is it possible to update the hostname of an existing Docker node?

2) Is it possible giving a name to a node while joining to swarm?

about 4 years ago · Santiago Trujillo
3 answers
Answer question

0

  1. change hostname: hostname *** or vi /etc/hosts

  2. restart docker: sudo systemctl restart docker

You can see 'Name' user docker info

about 4 years ago · Santiago Trujillo Report

0

This trio works well:

echo '127.0.0.1 <hostname>' | sudo tee -a /etc/hosts
sudo hostnamectl set-hostname <hostname>
sudo systemctl restart docker
about 4 years ago · Santiago Trujillo Report

0

You will have to login each nodes and set the node hostname use command:

sudo hostnamectl set-hostname <hostname>

Once you changed all nodes hostname, go the the manager node and restart your docker, after that you should be good.

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!