File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -500,10 +500,15 @@ def create_container_config(
500
500
]
501
501
502
502
if labels is not None and compare_version ('1.18' , version ) < 0 :
503
- raise errors .DockerException (
503
+ raise errors .InvalidVersion (
504
504
'labels were only introduced in API version 1.18'
505
505
)
506
506
507
+ if volume_driver is not None and compare_version ('1.19' , version ) < 0 :
508
+ raise errors .InvalidVersion (
509
+ 'Volume drivers were only introduced in API version 1.19'
510
+ )
511
+
507
512
if isinstance (labels , list ):
508
513
labels = dict ((lbl , six .text_type ('' )) for lbl in labels )
509
514
@@ -557,9 +562,9 @@ def create_container_config(
557
562
message = ('{0!r} parameter has no effect on create_container().'
558
563
' It has been moved to start()' )
559
564
if dns is not None :
560
- raise errors .DockerException (message .format ('dns' ))
565
+ raise errors .InvalidVersion (message .format ('dns' ))
561
566
if volumes_from is not None :
562
- raise errors .DockerException (message .format ('volumes_from' ))
567
+ raise errors .InvalidVersion (message .format ('volumes_from' ))
563
568
564
569
return {
565
570
'Hostname' : hostname ,
You can’t perform that action at this time.
0 commit comments