container_name: Setting the container name is not supported

container_name: Setting the container name is not supported

 

Khi khởi tạo cụm Docker swarm nếu chọn option container_name sẽ xuất hiện lỗi như sau

container_name: Setting the container name is not supported.

#

container_name không được hỗ trợ bởi nó sẽ phá vỡ khả năng mở rộng giữa các node của. container có thể ở bất kỳ node nào và có thể tăng số lượng node tuỳ theo từng yêu cầu. Thay vào đó có thể sử dụng service name.

 

Tương tự depends_on cũng không được hỗ trợ​​ vì container có thể được start ở bất kỳ node nào.

 

 

 

 

Tham khảo:

https://stackoverflow.com/questions/51454349/docker-docker-compose-file-for-docker-stack-deploy

https://docs.docker.com/compose/compose-file/

 

 

 

 

 

BÀI VIẾT CÙNG CHUYÊN MỤC