Pārlūkot izejas kodu

Fix #1426 - migrate_to_labels not found

Signed-off-by: Harald Albers <[email protected]>
Harald Albers 10 gadi atpakaļ
vecāks
revīzija
41315b32cb
2 mainītis faili ar 6 papildinājumiem un 1 dzēšanām
  1. 5 0
      compose/cli/main.py
  2. 1 1
      compose/service.py

+ 5 - 0
compose/cli/main.py

@@ -490,6 +490,11 @@ class TopLevelCommand(Command):
                 project.stop(service_names=service_names, **params)
                 project.stop(service_names=service_names, **params)
 
 
     def migrate_to_labels(self, project, _options):
     def migrate_to_labels(self, project, _options):
+        """
+        Recreate containers to add labels
+
+        Usage: migrate_to_labels
+        """
         migration.migrate_project_to_labels(project)
         migration.migrate_project_to_labels(project)
 
 
 
 

+ 1 - 1
compose/service.py

@@ -786,7 +786,7 @@ def check_for_legacy_containers(
                 "labels. As of compose 1.3.0 containers are identified with "
                 "labels. As of compose 1.3.0 containers are identified with "
                 "labels instead of naming convention. If you'd like compose "
                 "labels instead of naming convention. If you'd like compose "
                 "to use this container, please run "
                 "to use this container, please run "
-                "`docker-compose --migrate-to-labels`" % (name,))
+                "`docker-compose migrate_to_labels`" % (name,))
 
 
 
 
 def parse_restart_spec(restart_config):
 def parse_restart_spec(restart_config):