Class: DockerEngineAPI::Models::ContainerCreateParams::Config

Inherits:
DockerEngineAPI::Models::Config show all
Defined in:
lib/docker_engine_api/models/container_create_params.rb

Defined Under Namespace

Classes: HostConfig, NetworkingConfig

Instance Attribute Summary collapse

Attributes inherited from DockerEngineAPI::Models::Config

#args_escaped, #attach_stderr, #attach_stdin, #attach_stdout, #cmd, #domainname, #entrypoint, #env, #exposed_ports, #healthcheck, #hostname, #image, #labels, #network_disabled, #on_build, #open_stdin, #shell, #stdin_once, #stop_signal, #stop_timeout, #tty, #user, #volumes, #working_dir

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(hard: nil, name: nil, soft: nil) ⇒ Object

Parameters:

  • hard (Integer) (defaults to: nil)

    Hard limit

  • name (String) (defaults to: nil)

    Name of ulimit

  • soft (Integer) (defaults to: nil)

    Soft limit



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
# File 'lib/docker_engine_api/models/container_create_params.rb', line 55

class Config < DockerEngineAPI::Models::Config
  # @!attribute host_config
  #   Container configuration that depends on the host we are running on
  #
  #   @return [DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig, nil]
  optional :host_config,
           -> { DockerEngineAPI::ContainerCreateParams::Config::HostConfig },
           api_name: :HostConfig

  # @!attribute networking_config
  #   NetworkingConfig represents the container's networking configuration for each of
  #   its interfaces. It is used for the networking configs specified in the
  #   `docker create` and `docker network connect` commands.
  #
  #   @return [DockerEngineAPI::Models::ContainerCreateParams::Config::NetworkingConfig, nil]
  optional :networking_config,
           -> { DockerEngineAPI::ContainerCreateParams::Config::NetworkingConfig },
           api_name: :NetworkingConfig

  # @!method initialize(host_config: nil, networking_config: nil)
  #   Some parameter documentations has been truncated, see
  #   {DockerEngineAPI::Models::ContainerCreateParams::Config} for more details.
  #
  #   Configuration for a container that is portable between hosts.
  #
  #   @param host_config [DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig] Container configuration that depends on the host we are running on
  #
  #   @param networking_config [DockerEngineAPI::Models::ContainerCreateParams::Config::NetworkingConfig] NetworkingConfig represents the container's networking configuration for

  class HostConfig < DockerEngineAPI::Internal::Type::BaseModel
    # @!attribute annotations
    #   Arbitrary non-identifying metadata attached to container and provided to the
    #   runtime when the container is started.
    #
    #   @return [Hash{Symbol=>String}, nil]
    optional :annotations, DockerEngineAPI::Internal::Type::HashOf[String], api_name: :Annotations

    # @!attribute auto_remove
    #   Automatically remove the container when the container's process exits. This has
    #   no effect if `RestartPolicy` is set.
    #
    #   @return [Boolean, nil]
    optional :auto_remove, DockerEngineAPI::Internal::Type::Boolean, api_name: :AutoRemove

    # @!attribute binds
    #   A list of volume bindings for this container. Each volume binding is a string in
    #   one of these forms:
    #
    #   - `host-src:container-dest[:options]` to bind-mount a host path into the
    #     container. Both `host-src`, and `container-dest` must be an _absolute_ path.
    #   - `volume-name:container-dest[:options]` to bind-mount a volume managed by a
    #     volume driver into the container. `container-dest` must be an _absolute_ path.
    #
    #   `options` is an optional, comma-delimited list of:
    #
    #   - `nocopy` disables automatic copying of data from the container path to the
    #     volume. The `nocopy` flag only applies to named volumes.
    #   - `[ro|rw]` mounts a volume read-only or read-write, respectively. If omitted or
    #     set to `rw`, volumes are mounted read-write.
    #   - `[z|Z]` applies SELinux labels to allow or deny multiple containers to read
    #     and write to the same volume.
    #     - `z`: a _shared_ content label is applied to the content. This label
    #       indicates that multiple containers can share the volume content, for both
    #       reading and writing.
    #     - `Z`: a _private unshared_ label is applied to the content. This label
    #       indicates that only the current container can use a private volume. Labeling
    #       systems such as SELinux require proper labels to be placed on volume content
    #       that is mounted into a container. Without a label, the security system can
    #       prevent a container's processes from using the content. By default, the
    #       labels set by the host operating system are not modified.
    #   - `[[r]shared|[r]slave|[r]private]` specifies mount
    #     [propagation behavior](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt).
    #     This only applies to bind-mounted volumes, not internal volumes or named
    #     volumes. Mount propagation requires the source mount point (the location where
    #     the source directory is mounted in the host operating system) to have the
    #     correct propagation properties. For shared volumes, the source mount point
    #     must be set to `shared`. For slave volumes, the mount must be set to either
    #     `shared` or `slave`.
    #
    #   @return [Array<String>, nil]
    optional :binds, DockerEngineAPI::Internal::Type::ArrayOf[String], api_name: :Binds

    # @!attribute blkio_device_read_bps
    #   Limit read rate (bytes per second) from a device, in the form:
    #
    #   ```
    #   [{"Path": "device_path", "Rate": rate}]
    #   ```
    #
    #   @return [Array<DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::BlkioDeviceReadBp>, nil]
    optional :blkio_device_read_bps,
             -> {
               DockerEngineAPI::Internal::Type::ArrayOf[DockerEngineAPI::ContainerCreateParams::Config::HostConfig::BlkioDeviceReadBp]
             },
             api_name: :BlkioDeviceReadBps

    # @!attribute blkio_device_read_i_ops
    #   Limit read rate (IO per second) from a device, in the form:
    #
    #   ```
    #   [{"Path": "device_path", "Rate": rate}]
    #   ```
    #
    #   @return [Array<DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::BlkioDeviceReadIOp>, nil]
    optional :blkio_device_read_i_ops,
             -> {
               DockerEngineAPI::Internal::Type::ArrayOf[DockerEngineAPI::ContainerCreateParams::Config::HostConfig::BlkioDeviceReadIOp]
             },
             api_name: :BlkioDeviceReadIOps

    # @!attribute blkio_device_write_bps
    #   Limit write rate (bytes per second) to a device, in the form:
    #
    #   ```
    #   [{"Path": "device_path", "Rate": rate}]
    #   ```
    #
    #   @return [Array<DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::BlkioDeviceWriteBp>, nil]
    optional :blkio_device_write_bps,
             -> {
               DockerEngineAPI::Internal::Type::ArrayOf[DockerEngineAPI::ContainerCreateParams::Config::HostConfig::BlkioDeviceWriteBp]
             },
             api_name: :BlkioDeviceWriteBps

    # @!attribute blkio_device_write_i_ops
    #   Limit write rate (IO per second) to a device, in the form:
    #
    #   ```
    #   [{"Path": "device_path", "Rate": rate}]
    #   ```
    #
    #   @return [Array<DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::BlkioDeviceWriteIOp>, nil]
    optional :blkio_device_write_i_ops,
             -> {
               DockerEngineAPI::Internal::Type::ArrayOf[DockerEngineAPI::ContainerCreateParams::Config::HostConfig::BlkioDeviceWriteIOp]
             },
             api_name: :BlkioDeviceWriteIOps

    # @!attribute blkio_weight
    #   Block IO weight (relative weight).
    #
    #   @return [Integer, nil]
    optional :blkio_weight, Integer, api_name: :BlkioWeight

    # @!attribute blkio_weight_device
    #   Block IO weight (relative device weight) in the form:
    #
    #   ```
    #   [{"Path": "device_path", "Weight": weight}]
    #   ```
    #
    #   @return [Array<DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::BlkioWeightDevice>, nil]
    optional :blkio_weight_device,
             -> {
               DockerEngineAPI::Internal::Type::ArrayOf[DockerEngineAPI::ContainerCreateParams::Config::HostConfig::BlkioWeightDevice]
             },
             api_name: :BlkioWeightDevice

    # @!attribute cap_add
    #   A list of kernel capabilities to add to the container. Conflicts with option
    #   'Capabilities'.
    #
    #   @return [Array<String>, nil]
    optional :cap_add, DockerEngineAPI::Internal::Type::ArrayOf[String], api_name: :CapAdd

    # @!attribute cap_drop
    #   A list of kernel capabilities to drop from the container. Conflicts with option
    #   'Capabilities'.
    #
    #   @return [Array<String>, nil]
    optional :cap_drop, DockerEngineAPI::Internal::Type::ArrayOf[String], api_name: :CapDrop

    # @!attribute cgroup
    #   Cgroup to use for the container.
    #
    #   @return [String, nil]
    optional :cgroup, String, api_name: :Cgroup

    # @!attribute cgroupns_mode
    #   cgroup namespace mode for the container. Possible values are:
    #
    #   - `"private"`: the container runs in its own private cgroup namespace
    #   - `"host"`: use the host system's cgroup namespace
    #
    #   If not specified, the daemon default is used, which can either be `"private"` or
    #   `"host"`, depending on daemon version, kernel support and configuration.
    #
    #   @return [Symbol, DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::CgroupnsMode, nil]
    optional :cgroupns_mode,
             enum: -> { DockerEngineAPI::ContainerCreateParams::Config::HostConfig::CgroupnsMode },
             api_name: :CgroupnsMode

    # @!attribute cgroup_parent
    #   Path to `cgroups` under which the container's `cgroup` is created. If the path
    #   is not absolute, the path is considered to be relative to the `cgroups` path of
    #   the init process. Cgroups are created if they do not already exist.
    #
    #   @return [String, nil]
    optional :cgroup_parent, String, api_name: :CgroupParent

    # @!attribute console_size
    #   Initial console size, as an `[height, width]` array.
    #
    #   @return [Array<Integer>, nil]
    optional :console_size,
             DockerEngineAPI::Internal::Type::ArrayOf[Integer],
             api_name: :ConsoleSize,
             nil?: true

    # @!attribute container_id_file
    #   Path to a file where the container ID is written
    #
    #   @return [String, nil]
    optional :container_id_file, String, api_name: :ContainerIDFile

    # @!attribute cpu_count
    #   The number of usable CPUs (Windows only).
    #
    #   On Windows Server containers, the processor resource controls are mutually
    #   exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and
    #   `CPUPercent` last.
    #
    #   @return [Integer, nil]
    optional :cpu_count, Integer, api_name: :CpuCount

    # @!attribute cpu_percent
    #   The usable percentage of the available CPUs (Windows only).
    #
    #   On Windows Server containers, the processor resource controls are mutually
    #   exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and
    #   `CPUPercent` last.
    #
    #   @return [Integer, nil]
    optional :cpu_percent, Integer, api_name: :CpuPercent

    # @!attribute cpu_period
    #   The length of a CPU period in microseconds.
    #
    #   @return [Integer, nil]
    optional :cpu_period, Integer, api_name: :CpuPeriod

    # @!attribute cpu_quota
    #   Microseconds of CPU time that the container can get in a CPU period.
    #
    #   @return [Integer, nil]
    optional :cpu_quota, Integer, api_name: :CpuQuota

    # @!attribute cpu_realtime_period
    #   The length of a CPU real-time period in microseconds. Set to 0 to allocate no
    #   time allocated to real-time tasks.
    #
    #   @return [Integer, nil]
    optional :cpu_realtime_period, Integer, api_name: :CpuRealtimePeriod

    # @!attribute cpu_realtime_runtime
    #   The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no
    #   time allocated to real-time tasks.
    #
    #   @return [Integer, nil]
    optional :cpu_realtime_runtime, Integer, api_name: :CpuRealtimeRuntime

    # @!attribute cpuset_cpus
    #   CPUs in which to allow execution (e.g., `0-3`, `0,1`).
    #
    #   @return [String, nil]
    optional :cpuset_cpus, String, api_name: :CpusetCpus

    # @!attribute cpuset_mems
    #   Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on
    #   NUMA systems.
    #
    #   @return [String, nil]
    optional :cpuset_mems, String, api_name: :CpusetMems

    # @!attribute cpu_shares
    #   An integer value representing this container's relative CPU weight versus other
    #   containers.
    #
    #   @return [Integer, nil]
    optional :cpu_shares, Integer, api_name: :CpuShares

    # @!attribute device_cgroup_rules
    #   a list of cgroup rules to apply to the container
    #
    #   @return [Array<String>, nil]
    optional :device_cgroup_rules,
             DockerEngineAPI::Internal::Type::ArrayOf[String],
             api_name: :DeviceCgroupRules

    # @!attribute device_requests
    #   A list of requests for devices to be sent to device drivers.
    #
    #   @return [Array<DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::DeviceRequest>, nil]
    optional :device_requests,
             -> {
               DockerEngineAPI::Internal::Type::ArrayOf[DockerEngineAPI::ContainerCreateParams::Config::HostConfig::DeviceRequest]
             },
             api_name: :DeviceRequests

    # @!attribute devices
    #   A list of devices to add to the container.
    #
    #   @return [Array<DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::Device>, nil]
    optional :devices,
             -> {
               DockerEngineAPI::Internal::Type::ArrayOf[DockerEngineAPI::ContainerCreateParams::Config::HostConfig::Device]
             },
             api_name: :Devices

    # @!attribute dns
    #   A list of DNS servers for the container to use.
    #
    #   @return [Array<String>, nil]
    optional :dns, DockerEngineAPI::Internal::Type::ArrayOf[String], api_name: :Dns

    # @!attribute dns_options
    #   A list of DNS options.
    #
    #   @return [Array<String>, nil]
    optional :dns_options, DockerEngineAPI::Internal::Type::ArrayOf[String], api_name: :DnsOptions

    # @!attribute dns_search
    #   A list of DNS search domains.
    #
    #   @return [Array<String>, nil]
    optional :dns_search, DockerEngineAPI::Internal::Type::ArrayOf[String], api_name: :DnsSearch

    # @!attribute extra_hosts
    #   A list of hostnames/IP mappings to add to the container's `/etc/hosts` file.
    #   Specified in the form `["hostname:IP"]`.
    #
    #   @return [Array<String>, nil]
    optional :extra_hosts, DockerEngineAPI::Internal::Type::ArrayOf[String], api_name: :ExtraHosts

    # @!attribute group_add
    #   A list of additional groups that the container process will run as.
    #
    #   @return [Array<String>, nil]
    optional :group_add, DockerEngineAPI::Internal::Type::ArrayOf[String], api_name: :GroupAdd

    # @!attribute init
    #   Run an init inside the container that forwards signals and reaps processes. This
    #   field is omitted if empty, and the default (as configured on the daemon) is
    #   used.
    #
    #   @return [Boolean, nil]
    optional :init, DockerEngineAPI::Internal::Type::Boolean, api_name: :Init, nil?: true

    # @!attribute io_maximum_bandwidth
    #   Maximum IO in bytes per second for the container system drive (Windows only).
    #
    #   @return [Integer, nil]
    optional :io_maximum_bandwidth, Integer, api_name: :IOMaximumBandwidth

    # @!attribute io_maximum_i_ops
    #   Maximum IOps for the container system drive (Windows only)
    #
    #   @return [Integer, nil]
    optional :io_maximum_i_ops, Integer, api_name: :IOMaximumIOps

    # @!attribute ipc_mode
    #   IPC sharing mode for the container. Possible values are:
    #
    #   - `"none"`: own private IPC namespace, with /dev/shm not mounted
    #   - `"private"`: own private IPC namespace
    #   - `"shareable"`: own private IPC namespace, with a possibility to share it with
    #     other containers
    #   - `"container:<name|id>"`: join another (shareable) container's IPC namespace
    #   - `"host"`: use the host system's IPC namespace
    #
    #   If not specified, daemon default is used, which can either be `"private"` or
    #   `"shareable"`, depending on daemon version and configuration.
    #
    #   @return [String, nil]
    optional :ipc_mode, String, api_name: :IpcMode

    # @!attribute isolation
    #   Isolation technology of the container. (Windows only)
    #
    #   @return [Symbol, DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::Isolation, nil]
    optional :isolation,
             enum: -> { DockerEngineAPI::ContainerCreateParams::Config::HostConfig::Isolation },
             api_name: :Isolation

    # @!attribute links
    #   A list of links for the container in the form `container_name:alias`.
    #
    #   @return [Array<String>, nil]
    optional :links, DockerEngineAPI::Internal::Type::ArrayOf[String], api_name: :Links

    # @!attribute log_config
    #   The logging configuration for this container
    #
    #   @return [DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::LogConfig, nil]
    optional :log_config,
             -> { DockerEngineAPI::ContainerCreateParams::Config::HostConfig::LogConfig },
             api_name: :LogConfig

    # @!attribute masked_paths
    #   The list of paths to be masked inside the container (this overrides the default
    #   set of paths).
    #
    #   @return [Array<String>, nil]
    optional :masked_paths, DockerEngineAPI::Internal::Type::ArrayOf[String], api_name: :MaskedPaths

    # @!attribute memory
    #   Memory limit in bytes.
    #
    #   @return [Integer, nil]
    optional :memory, Integer, api_name: :Memory

    # @!attribute memory_reservation
    #   Memory soft limit in bytes.
    #
    #   @return [Integer, nil]
    optional :memory_reservation, Integer, api_name: :MemoryReservation

    # @!attribute memory_swap
    #   Total memory limit (memory + swap). Set as `-1` to enable unlimited swap.
    #
    #   @return [Integer, nil]
    optional :memory_swap, Integer, api_name: :MemorySwap

    # @!attribute memory_swappiness
    #   Tune a container's memory swappiness behavior. Accepts an integer between 0
    #   and 100.
    #
    #   @return [Integer, nil]
    optional :memory_swappiness, Integer, api_name: :MemorySwappiness

    # @!attribute mounts
    #   Specification for mounts to be added to the container.
    #
    #   @return [Array<DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::Mount>, nil]
    optional :mounts,
             -> {
               DockerEngineAPI::Internal::Type::ArrayOf[DockerEngineAPI::ContainerCreateParams::Config::HostConfig::Mount]
             },
             api_name: :Mounts

    # @!attribute nano_cpus
    #   CPU quota in units of 10<sup>-9</sup> CPUs.
    #
    #   @return [Integer, nil]
    optional :nano_cpus, Integer, api_name: :NanoCpus

    # @!attribute network_mode
    #   Network mode to use for this container. Supported standard values are: `bridge`,
    #   `host`, `none`, and `container:<name|id>`. Any other value is taken as a custom
    #   network's name to which this container should connect to.
    #
    #   @return [String, nil]
    optional :network_mode, String, api_name: :NetworkMode

    # @!attribute oom_kill_disable
    #   Disable OOM Killer for the container.
    #
    #   @return [Boolean, nil]
    optional :oom_kill_disable, DockerEngineAPI::Internal::Type::Boolean, api_name: :OomKillDisable

    # @!attribute oom_score_adj
    #   An integer value containing the score given to the container in order to tune
    #   OOM killer preferences.
    #
    #   @return [Integer, nil]
    optional :oom_score_adj, Integer, api_name: :OomScoreAdj

    # @!attribute pid_mode
    #   Set the PID (Process) Namespace mode for the container. It can be either:
    #
    #   - `"container:<name|id>"`: joins another container's PID namespace
    #   - `"host"`: use the host's PID namespace inside the container
    #
    #   @return [String, nil]
    optional :pid_mode, String, api_name: :PidMode

    # @!attribute pids_limit
    #   Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` to not
    #   change.
    #
    #   @return [Integer, nil]
    optional :pids_limit, Integer, api_name: :PidsLimit, nil?: true

    # @!attribute port_bindings
    #   PortMap describes the mapping of container ports to host ports, using the
    #   container's port-number and protocol as key in the format `<port>/<protocol>`,
    #   for example, `80/udp`.
    #
    #   If a container's port is mapped for multiple protocols, separate entries are
    #   added to the mapping table.
    #
    #   @return [Hash{Symbol=>Array<DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::PortBinding>}, nil]
    optional :port_bindings,
             -> do
               DockerEngineAPI::Internal::Type::HashOf[
                 DockerEngineAPI::Internal::Type::ArrayOf[DockerEngineAPI::ContainerCreateParams::Config::HostConfig::PortBinding]
               ]
             end,
             api_name: :PortBindings

    # @!attribute privileged
    #   Gives the container full access to the host.
    #
    #   @return [Boolean, nil]
    optional :privileged, DockerEngineAPI::Internal::Type::Boolean, api_name: :Privileged

    # @!attribute publish_all_ports
    #   Allocates an ephemeral host port for all of a container's exposed ports.
    #
    #   Ports are de-allocated when the container stops and allocated when the container
    #   starts. The allocated port might be changed when restarting the container.
    #
    #   The port is selected from the ephemeral port range that depends on the kernel.
    #   For example, on Linux the range is defined by
    #   `/proc/sys/net/ipv4/ip_local_port_range`.
    #
    #   @return [Boolean, nil]
    optional :publish_all_ports, DockerEngineAPI::Internal::Type::Boolean, api_name: :PublishAllPorts

    # @!attribute readonly_paths
    #   The list of paths to be set as read-only inside the container (this overrides
    #   the default set of paths).
    #
    #   @return [Array<String>, nil]
    optional :readonly_paths, DockerEngineAPI::Internal::Type::ArrayOf[String], api_name: :ReadonlyPaths

    # @!attribute readonly_rootfs
    #   Mount the container's root filesystem as read only.
    #
    #   @return [Boolean, nil]
    optional :readonly_rootfs, DockerEngineAPI::Internal::Type::Boolean, api_name: :ReadonlyRootfs

    # @!attribute restart_policy
    #   The behavior to apply when the container exits. The default is not to restart.
    #
    #   An ever increasing delay (double the previous delay, starting at 100ms) is added
    #   before each restart to prevent flooding the server.
    #
    #   @return [DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::RestartPolicy, nil]
    optional :restart_policy,
             -> { DockerEngineAPI::ContainerCreateParams::Config::HostConfig::RestartPolicy },
             api_name: :RestartPolicy

    # @!attribute runtime
    #   Runtime to use with this container.
    #
    #   @return [String, nil]
    optional :runtime, String, api_name: :Runtime, nil?: true

    # @!attribute security_opt
    #   A list of string values to customize labels for MLS systems, such as SELinux.
    #
    #   @return [Array<String>, nil]
    optional :security_opt, DockerEngineAPI::Internal::Type::ArrayOf[String], api_name: :SecurityOpt

    # @!attribute shm_size
    #   Size of `/dev/shm` in bytes. If omitted, the system uses 64MB.
    #
    #   @return [Integer, nil]
    optional :shm_size, Integer, api_name: :ShmSize

    # @!attribute storage_opt
    #   Storage driver options for this container, in the form `{"size": "120G"}`.
    #
    #   @return [Hash{Symbol=>String}, nil]
    optional :storage_opt, DockerEngineAPI::Internal::Type::HashOf[String], api_name: :StorageOpt

    # @!attribute sysctls
    #   A list of kernel parameters (sysctls) to set in the container.
    #
    #   This field is omitted if not set.
    #
    #   @return [Hash{Symbol=>String}, nil]
    optional :sysctls, DockerEngineAPI::Internal::Type::HashOf[String], api_name: :Sysctls, nil?: true

    # @!attribute tmpfs
    #   A map of container directories which should be replaced by tmpfs mounts, and
    #   their corresponding mount options. For example:
    #
    #   ```
    #   { "/run": "rw,noexec,nosuid,size=65536k" }
    #   ```
    #
    #   @return [Hash{Symbol=>String}, nil]
    optional :tmpfs, DockerEngineAPI::Internal::Type::HashOf[String], api_name: :Tmpfs

    # @!attribute ulimits
    #   A list of resource limits to set in the container. For example:
    #
    #   ```
    #   {"Name": "nofile", "Soft": 1024, "Hard": 2048}
    #   ```
    #
    #   @return [Array<DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::Ulimit>, nil]
    optional :ulimits,
             -> {
               DockerEngineAPI::Internal::Type::ArrayOf[DockerEngineAPI::ContainerCreateParams::Config::HostConfig::Ulimit]
             },
             api_name: :Ulimits

    # @!attribute userns_mode
    #   Sets the usernamespace mode for the container when usernamespace remapping
    #   option is enabled.
    #
    #   @return [String, nil]
    optional :userns_mode, String, api_name: :UsernsMode

    # @!attribute uts_mode
    #   UTS namespace to use for the container.
    #
    #   @return [String, nil]
    optional :uts_mode, String, api_name: :UTSMode

    # @!attribute volume_driver
    #   Driver that this container uses to mount volumes.
    #
    #   @return [String, nil]
    optional :volume_driver, String, api_name: :VolumeDriver

    # @!attribute volumes_from
    #   A list of volumes to inherit from another container, specified in the form
    #   `<container name>[:<ro|rw>]`.
    #
    #   @return [Array<String>, nil]
    optional :volumes_from, DockerEngineAPI::Internal::Type::ArrayOf[String], api_name: :VolumesFrom

    # @!method initialize(annotations: nil, auto_remove: nil, binds: nil, blkio_device_read_bps: nil, blkio_device_read_i_ops: nil, blkio_device_write_bps: nil, blkio_device_write_i_ops: nil, blkio_weight: nil, blkio_weight_device: nil, cap_add: nil, cap_drop: nil, cgroup: nil, cgroupns_mode: nil, cgroup_parent: nil, console_size: nil, container_id_file: nil, cpu_count: nil, cpu_percent: nil, cpu_period: nil, cpu_quota: nil, cpu_realtime_period: nil, cpu_realtime_runtime: nil, cpuset_cpus: nil, cpuset_mems: nil, cpu_shares: nil, device_cgroup_rules: nil, device_requests: nil, devices: nil, dns: nil, dns_options: nil, dns_search: nil, extra_hosts: nil, group_add: nil, init: nil, io_maximum_bandwidth: nil, io_maximum_i_ops: nil, ipc_mode: nil, isolation: nil, links: nil, log_config: nil, masked_paths: nil, memory: nil, memory_reservation: nil, memory_swap: nil, memory_swappiness: nil, mounts: nil, nano_cpus: nil, network_mode: nil, oom_kill_disable: nil, oom_score_adj: nil, pid_mode: nil, pids_limit: nil, port_bindings: nil, privileged: nil, publish_all_ports: nil, readonly_paths: nil, readonly_rootfs: nil, restart_policy: nil, runtime: nil, security_opt: nil, shm_size: nil, storage_opt: nil, sysctls: nil, tmpfs: nil, ulimits: nil, userns_mode: nil, uts_mode: nil, volume_driver: nil, volumes_from: nil)
    #   Some parameter documentations has been truncated, see
    #   {DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig} for more
    #   details.
    #
    #   Container configuration that depends on the host we are running on
    #
    #   @param annotations [Hash{Symbol=>String}] Arbitrary non-identifying metadata attached to container and
    #
    #   @param auto_remove [Boolean] Automatically remove the container when the container's process
    #
    #   @param binds [Array<String>] A list of volume bindings for this container. Each volume binding
    #
    #   @param blkio_device_read_bps [Array<DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::BlkioDeviceReadBp>] Limit read rate (bytes per second) from a device, in the form:
    #
    #   @param blkio_device_read_i_ops [Array<DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::BlkioDeviceReadIOp>] Limit read rate (IO per second) from a device, in the form:
    #
    #   @param blkio_device_write_bps [Array<DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::BlkioDeviceWriteBp>] Limit write rate (bytes per second) to a device, in the form:
    #
    #   @param blkio_device_write_i_ops [Array<DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::BlkioDeviceWriteIOp>] Limit write rate (IO per second) to a device, in the form:
    #
    #   @param blkio_weight [Integer] Block IO weight (relative weight).
    #
    #   @param blkio_weight_device [Array<DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::BlkioWeightDevice>] Block IO weight (relative device weight) in the form:
    #
    #   @param cap_add [Array<String>] A list of kernel capabilities to add to the container. Conflicts
    #
    #   @param cap_drop [Array<String>] A list of kernel capabilities to drop from the container. Conflicts
    #
    #   @param cgroup [String] Cgroup to use for the container.
    #
    #   @param cgroupns_mode [Symbol, DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::CgroupnsMode] cgroup namespace mode for the container. Possible values are:
    #
    #   @param cgroup_parent [String] Path to `cgroups` under which the container's `cgroup` is created. If
    #
    #   @param console_size [Array<Integer>, nil] Initial console size, as an `[height, width]` array.
    #
    #   @param container_id_file [String] Path to a file where the container ID is written
    #
    #   @param cpu_count [Integer] The number of usable CPUs (Windows only).
    #
    #   @param cpu_percent [Integer] The usable percentage of the available CPUs (Windows only).
    #
    #   @param cpu_period [Integer] The length of a CPU period in microseconds.
    #
    #   @param cpu_quota [Integer] Microseconds of CPU time that the container can get in a CPU period.
    #
    #   @param cpu_realtime_period [Integer] The length of a CPU real-time period in microseconds. Set to 0 to
    #
    #   @param cpu_realtime_runtime [Integer] The length of a CPU real-time runtime in microseconds. Set to 0 to
    #
    #   @param cpuset_cpus [String] CPUs in which to allow execution (e.g., `0-3`, `0,1`).
    #
    #   @param cpuset_mems [String] Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only
    #
    #   @param cpu_shares [Integer] An integer value representing this container's relative CPU weight
    #
    #   @param device_cgroup_rules [Array<String>] a list of cgroup rules to apply to the container
    #
    #   @param device_requests [Array<DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::DeviceRequest>] A list of requests for devices to be sent to device drivers.
    #
    #   @param devices [Array<DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::Device>] A list of devices to add to the container.
    #
    #   @param dns [Array<String>] A list of DNS servers for the container to use.
    #
    #   @param dns_options [Array<String>] A list of DNS options.
    #
    #   @param dns_search [Array<String>] A list of DNS search domains.
    #
    #   @param extra_hosts [Array<String>] A list of hostnames/IP mappings to add to the container's `/etc/hosts`
    #
    #   @param group_add [Array<String>] A list of additional groups that the container process will run as.
    #
    #   @param init [Boolean, nil] Run an init inside the container that forwards signals and reaps
    #
    #   @param io_maximum_bandwidth [Integer] Maximum IO in bytes per second for the container system drive
    #
    #   @param io_maximum_i_ops [Integer] Maximum IOps for the container system drive (Windows only)
    #
    #   @param ipc_mode [String] IPC sharing mode for the container. Possible values are:
    #
    #   @param isolation [Symbol, DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::Isolation] Isolation technology of the container. (Windows only)
    #
    #   @param links [Array<String>] A list of links for the container in the form `container_name:alias`.
    #
    #   @param log_config [DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::LogConfig] The logging configuration for this container
    #
    #   @param masked_paths [Array<String>] The list of paths to be masked inside the container (this overrides
    #
    #   @param memory [Integer] Memory limit in bytes.
    #
    #   @param memory_reservation [Integer] Memory soft limit in bytes.
    #
    #   @param memory_swap [Integer] Total memory limit (memory + swap). Set as `-1` to enable unlimited
    #
    #   @param memory_swappiness [Integer] Tune a container's memory swappiness behavior. Accepts an integer
    #
    #   @param mounts [Array<DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::Mount>] Specification for mounts to be added to the container.
    #
    #   @param nano_cpus [Integer] CPU quota in units of 10<sup>-9</sup> CPUs.
    #
    #   @param network_mode [String] Network mode to use for this container. Supported standard values
    #
    #   @param oom_kill_disable [Boolean] Disable OOM Killer for the container.
    #
    #   @param oom_score_adj [Integer] An integer value containing the score given to the container in
    #
    #   @param pid_mode [String] Set the PID (Process) Namespace mode for the container. It can be
    #
    #   @param pids_limit [Integer, nil] Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null`
    #
    #   @param port_bindings [Hash{Symbol=>Array<DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::PortBinding>}] PortMap describes the mapping of container ports to host ports, using the
    #
    #   @param privileged [Boolean] Gives the container full access to the host.
    #
    #   @param publish_all_ports [Boolean] Allocates an ephemeral host port for all of a container's
    #
    #   @param readonly_paths [Array<String>] The list of paths to be set as read-only inside the container
    #
    #   @param readonly_rootfs [Boolean] Mount the container's root filesystem as read only.
    #
    #   @param restart_policy [DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::RestartPolicy] The behavior to apply when the container exits. The default is not to
    #
    #   @param runtime [String, nil] Runtime to use with this container.
    #
    #   @param security_opt [Array<String>] A list of string values to customize labels for MLS systems, such
    #
    #   @param shm_size [Integer] Size of `/dev/shm` in bytes. If omitted, the system uses 64MB.
    #
    #   @param storage_opt [Hash{Symbol=>String}] Storage driver options for this container, in the form `{"size": "120G"}`.
    #
    #   @param sysctls [Hash{Symbol=>String}, nil] A list of kernel parameters (sysctls) to set in the container.
    #
    #   @param tmpfs [Hash{Symbol=>String}] A map of container directories which should be replaced by tmpfs
    #
    #   @param ulimits [Array<DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::Ulimit>] A list of resource limits to set in the container. For example:
    #
    #   @param userns_mode [String] Sets the usernamespace mode for the container when usernamespace
    #
    #   @param uts_mode [String] UTS namespace to use for the container.
    #
    #   @param volume_driver [String] Driver that this container uses to mount volumes.
    #
    #   @param volumes_from [Array<String>] A list of volumes to inherit from another container, specified in

    class BlkioDeviceReadBp < DockerEngineAPI::Internal::Type::BaseModel
      # @!attribute path
      #   Device path
      #
      #   @return [String, nil]
      optional :path, String, api_name: :Path

      # @!attribute rate
      #   Rate
      #
      #   @return [Integer, nil]
      optional :rate, Integer, api_name: :Rate

      # @!method initialize(path: nil, rate: nil)
      #   @param path [String] Device path
      #
      #   @param rate [Integer] Rate
    end

    class BlkioDeviceReadIOp < DockerEngineAPI::Internal::Type::BaseModel
      # @!attribute path
      #   Device path
      #
      #   @return [String, nil]
      optional :path, String, api_name: :Path

      # @!attribute rate
      #   Rate
      #
      #   @return [Integer, nil]
      optional :rate, Integer, api_name: :Rate

      # @!method initialize(path: nil, rate: nil)
      #   @param path [String] Device path
      #
      #   @param rate [Integer] Rate
    end

    class BlkioDeviceWriteBp < DockerEngineAPI::Internal::Type::BaseModel
      # @!attribute path
      #   Device path
      #
      #   @return [String, nil]
      optional :path, String, api_name: :Path

      # @!attribute rate
      #   Rate
      #
      #   @return [Integer, nil]
      optional :rate, Integer, api_name: :Rate

      # @!method initialize(path: nil, rate: nil)
      #   @param path [String] Device path
      #
      #   @param rate [Integer] Rate
    end

    class BlkioDeviceWriteIOp < DockerEngineAPI::Internal::Type::BaseModel
      # @!attribute path
      #   Device path
      #
      #   @return [String, nil]
      optional :path, String, api_name: :Path

      # @!attribute rate
      #   Rate
      #
      #   @return [Integer, nil]
      optional :rate, Integer, api_name: :Rate

      # @!method initialize(path: nil, rate: nil)
      #   @param path [String] Device path
      #
      #   @param rate [Integer] Rate
    end

    class BlkioWeightDevice < DockerEngineAPI::Internal::Type::BaseModel
      # @!attribute path
      #
      #   @return [String, nil]
      optional :path, String, api_name: :Path

      # @!attribute weight
      #
      #   @return [Integer, nil]
      optional :weight, Integer, api_name: :Weight

      # @!method initialize(path: nil, weight: nil)
      #   @param path [String]
      #   @param weight [Integer]
    end

    # cgroup namespace mode for the container. Possible values are:
    #
    # - `"private"`: the container runs in its own private cgroup namespace
    # - `"host"`: use the host system's cgroup namespace
    #
    # If not specified, the daemon default is used, which can either be `"private"` or
    # `"host"`, depending on daemon version, kernel support and configuration.
    #
    # @see DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig#cgroupns_mode
    module CgroupnsMode
      extend DockerEngineAPI::Internal::Type::Enum

      PRIVATE = :private
      HOST = :host

      # @!method self.values
      #   @return [Array<Symbol>]
    end

    class DeviceRequest < DockerEngineAPI::Internal::Type::BaseModel
      # @!attribute capabilities
      #   A list of capabilities; an OR list of AND lists of capabilities.
      #
      #   Note that if a driver is specified the capabilities have no effect on selecting
      #   a driver as the driver name is used directly.
      #
      #   Note that if no driver is specified the capabilities are used to select a driver
      #   with the required capabilities.
      #
      #   @return [Array<Array<String>>, nil]
      optional :capabilities,
               DockerEngineAPI::Internal::Type::ArrayOf[DockerEngineAPI::Internal::Type::ArrayOf[String]],
               api_name: :Capabilities

      # @!attribute count
      #
      #   @return [Integer, nil]
      optional :count, Integer, api_name: :Count

      # @!attribute device_ids
      #
      #   @return [Array<String>, nil]
      optional :device_ids, DockerEngineAPI::Internal::Type::ArrayOf[String], api_name: :DeviceIDs

      # @!attribute driver
      #   The name of the device driver to use for this request.
      #
      #   Note that if this is specified the capabilities are ignored when selecting a
      #   device driver.
      #
      #   @return [String, nil]
      optional :driver, String, api_name: :Driver

      # @!attribute options
      #   Driver-specific options, specified as a key/value pairs. These options are
      #   passed directly to the driver.
      #
      #   @return [Hash{Symbol=>String}, nil]
      optional :options, DockerEngineAPI::Internal::Type::HashOf[String], api_name: :Options

      # @!method initialize(capabilities: nil, count: nil, device_ids: nil, driver: nil, options: nil)
      #   Some parameter documentations has been truncated, see
      #   {DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::DeviceRequest}
      #   for more details.
      #
      #   A request for devices to be sent to device drivers
      #
      #   @param capabilities [Array<Array<String>>] A list of capabilities; an OR list of AND lists of capabilities.
      #
      #   @param count [Integer]
      #
      #   @param device_ids [Array<String>]
      #
      #   @param driver [String] The name of the device driver to use for this request.
      #
      #   @param options [Hash{Symbol=>String}] Driver-specific options, specified as a key/value pairs. These options
    end

    class Device < DockerEngineAPI::Internal::Type::BaseModel
      # @!attribute cgroup_permissions
      #
      #   @return [String, nil]
      optional :cgroup_permissions, String, api_name: :CgroupPermissions

      # @!attribute path_in_container
      #
      #   @return [String, nil]
      optional :path_in_container, String, api_name: :PathInContainer

      # @!attribute path_on_host
      #
      #   @return [String, nil]
      optional :path_on_host, String, api_name: :PathOnHost

      # @!method initialize(cgroup_permissions: nil, path_in_container: nil, path_on_host: nil)
      #   A device mapping between the host and container
      #
      #   @param cgroup_permissions [String]
      #   @param path_in_container [String]
      #   @param path_on_host [String]
    end

    # Isolation technology of the container. (Windows only)
    #
    # @see DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig#isolation
    module Isolation
      extend DockerEngineAPI::Internal::Type::Enum

      DEFAULT = :default
      PROCESS = :process
      HYPERV = :hyperv
      EMPTY = :""

      # @!method self.values
      #   @return [Array<Symbol>]
    end

    # @see DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig#log_config
    class LogConfig < DockerEngineAPI::Internal::Type::BaseModel
      # @!attribute config
      #   Driver-specific configuration options for the logging driver.
      #
      #   @return [Hash{Symbol=>String}, nil]
      optional :config, DockerEngineAPI::Internal::Type::HashOf[String], api_name: :Config

      # @!attribute type
      #   Name of the logging driver used for the container or "none" if logging is
      #   disabled.
      #
      #   @return [Symbol, DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::LogConfig::Type, nil]
      optional :type,
               enum: -> { DockerEngineAPI::ContainerCreateParams::Config::HostConfig::LogConfig::Type },
               api_name: :Type

      # @!method initialize(config: nil, type: nil)
      #   Some parameter documentations has been truncated, see
      #   {DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::LogConfig}
      #   for more details.
      #
      #   The logging configuration for this container
      #
      #   @param config [Hash{Symbol=>String}] Driver-specific configuration options for the logging driver.
      #
      #   @param type [Symbol, DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::LogConfig::Type] Name of the logging driver used for the container or "none"

      # Name of the logging driver used for the container or "none" if logging is
      # disabled.
      #
      # @see DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::LogConfig#type
      module Type
        extend DockerEngineAPI::Internal::Type::Enum

        LOCAL = :local
        JSON_FILE = :"json-file"
        SYSLOG = :syslog
        JOURNALD = :journald
        GELF = :gelf
        FLUENTD = :fluentd
        AWSLOGS = :awslogs
        SPLUNK = :splunk
        ETWLOGS = :etwlogs
        NONE = :none

        # @!method self.values
        #   @return [Array<Symbol>]
      end
    end

    class Mount < DockerEngineAPI::Internal::Type::BaseModel
      # @!attribute bind_options
      #   Optional configuration for the `bind` type.
      #
      #   @return [DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::Mount::BindOptions, nil]
      optional :bind_options,
               -> { DockerEngineAPI::ContainerCreateParams::Config::HostConfig::Mount::BindOptions },
               api_name: :BindOptions

      # @!attribute consistency
      #   The consistency requirement for the mount: `default`, `consistent`, `cached`, or
      #   `delegated`.
      #
      #   @return [String, nil]
      optional :consistency, String, api_name: :Consistency

      # @!attribute image_options
      #   Optional configuration for the `image` type.
      #
      #   @return [DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::Mount::ImageOptions, nil]
      optional :image_options,
               -> { DockerEngineAPI::ContainerCreateParams::Config::HostConfig::Mount::ImageOptions },
               api_name: :ImageOptions

      # @!attribute read_only
      #   Whether the mount should be read-only.
      #
      #   @return [Boolean, nil]
      optional :read_only, DockerEngineAPI::Internal::Type::Boolean, api_name: :ReadOnly

      # @!attribute source
      #   Mount source (e.g. a volume name, a host path). The source cannot be specified
      #   when using `Type=tmpfs`. For `Type=bind`, the source path must either exist, or
      #   the `CreateMountpoint` must be set to `true` to create the source path on the
      #   host if missing.
      #
      #   For `Type=npipe`, the pipe must exist prior to creating the container.
      #
      #   @return [String, nil]
      optional :source, String, api_name: :Source

      # @!attribute target
      #   Container path.
      #
      #   @return [String, nil]
      optional :target, String, api_name: :Target

      # @!attribute tmpfs_options
      #   Optional configuration for the `tmpfs` type.
      #
      #   @return [DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::Mount::TmpfsOptions, nil]
      optional :tmpfs_options,
               -> { DockerEngineAPI::ContainerCreateParams::Config::HostConfig::Mount::TmpfsOptions },
               api_name: :TmpfsOptions

      # @!attribute type
      #   The mount type. Available types:
      #
      #   - `bind` a mount of a file or directory from the host into the container.
      #   - `cluster` a Swarm cluster volume.
      #   - `image` an OCI image.
      #   - `npipe` a named pipe from the host into the container.
      #   - `tmpfs` a `tmpfs`.
      #   - `volume` a docker volume with the given `Name`.
      #
      #   @return [Symbol, DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::Mount::Type, nil]
      optional :type,
               enum: -> { DockerEngineAPI::ContainerCreateParams::Config::HostConfig::Mount::Type },
               api_name: :Type

      # @!attribute volume_options
      #   Optional configuration for the `volume` type.
      #
      #   @return [DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::Mount::VolumeOptions, nil]
      optional :volume_options,
               -> { DockerEngineAPI::ContainerCreateParams::Config::HostConfig::Mount::VolumeOptions },
               api_name: :VolumeOptions

      # @!method initialize(bind_options: nil, consistency: nil, image_options: nil, read_only: nil, source: nil, target: nil, tmpfs_options: nil, type: nil, volume_options: nil)
      #   Some parameter documentations has been truncated, see
      #   {DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::Mount} for
      #   more details.
      #
      #   @param bind_options [DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::Mount::BindOptions] Optional configuration for the `bind` type.
      #
      #   @param consistency [String] The consistency requirement for the mount: `default`, `consistent`, `cached`, or
      #
      #   @param image_options [DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::Mount::ImageOptions] Optional configuration for the `image` type.
      #
      #   @param read_only [Boolean] Whether the mount should be read-only.
      #
      #   @param source [String] Mount source (e.g. a volume name, a host path). The source cannot be
      #
      #   @param target [String] Container path.
      #
      #   @param tmpfs_options [DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::Mount::TmpfsOptions] Optional configuration for the `tmpfs` type.
      #
      #   @param type [Symbol, DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::Mount::Type] The mount type. Available types:
      #
      #   @param volume_options [DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::Mount::VolumeOptions] Optional configuration for the `volume` type.

      # @see DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::Mount#bind_options
      class BindOptions < DockerEngineAPI::Internal::Type::BaseModel
        # @!attribute create_mountpoint
        #   Create mount point on host if missing
        #
        #   @return [Boolean, nil]
        optional :create_mountpoint,
                 DockerEngineAPI::Internal::Type::Boolean,
                 api_name: :CreateMountpoint

        # @!attribute non_recursive
        #   Disable recursive bind mount.
        #
        #   @return [Boolean, nil]
        optional :non_recursive, DockerEngineAPI::Internal::Type::Boolean, api_name: :NonRecursive

        # @!attribute propagation
        #   A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`.
        #
        #   @return [Symbol, DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::Mount::BindOptions::Propagation, nil]
        optional :propagation,
                 enum: -> {
                   DockerEngineAPI::ContainerCreateParams::Config::HostConfig::Mount::BindOptions::Propagation
                 },
                 api_name: :Propagation

        # @!attribute read_only_force_recursive
        #   Raise an error if the mount cannot be made recursively read-only.
        #
        #   @return [Boolean, nil]
        optional :read_only_force_recursive,
                 DockerEngineAPI::Internal::Type::Boolean,
                 api_name: :ReadOnlyForceRecursive

        # @!attribute read_only_non_recursive
        #   Make the mount non-recursively read-only, but still leave the mount recursive
        #   (unless NonRecursive is set to `true` in conjunction).
        #
        #   Added in v1.44, before that version all read-only mounts were non-recursive by
        #   default. To match the previous behaviour this will default to `true` for clients
        #   on versions prior to v1.44.
        #
        #   @return [Boolean, nil]
        optional :read_only_non_recursive,
                 DockerEngineAPI::Internal::Type::Boolean,
                 api_name: :ReadOnlyNonRecursive

        # @!method initialize(create_mountpoint: nil, non_recursive: nil, propagation: nil, read_only_force_recursive: nil, read_only_non_recursive: nil)
        #   Some parameter documentations has been truncated, see
        #   {DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::Mount::BindOptions}
        #   for more details.
        #
        #   Optional configuration for the `bind` type.
        #
        #   @param create_mountpoint [Boolean] Create mount point on host if missing
        #
        #   @param non_recursive [Boolean] Disable recursive bind mount.
        #
        #   @param propagation [Symbol, DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::Mount::BindOptions::Propagation] A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`.
        #
        #   @param read_only_force_recursive [Boolean] Raise an error if the mount cannot be made recursively read-only.
        #
        #   @param read_only_non_recursive [Boolean] Make the mount non-recursively read-only, but still leave the mount recursive

        # A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`.
        #
        # @see DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::Mount::BindOptions#propagation
        module Propagation
          extend DockerEngineAPI::Internal::Type::Enum

          PRIVATE = :private
          RPRIVATE = :rprivate
          SHARED = :shared
          RSHARED = :rshared
          SLAVE = :slave
          RSLAVE = :rslave

          # @!method self.values
          #   @return [Array<Symbol>]
        end
      end

      # @see DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::Mount#image_options
      class ImageOptions < DockerEngineAPI::Internal::Type::BaseModel
        # @!attribute subpath
        #   Source path inside the image. Must be relative without any back traversals.
        #
        #   @return [String, nil]
        optional :subpath, String, api_name: :Subpath

        # @!method initialize(subpath: nil)
        #   Optional configuration for the `image` type.
        #
        #   @param subpath [String] Source path inside the image. Must be relative without any back traversals.
      end

      # @see DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::Mount#tmpfs_options
      class TmpfsOptions < DockerEngineAPI::Internal::Type::BaseModel
        # @!attribute mode
        #   The permission mode for the tmpfs mount in an integer. The value must not be in
        #   octal format (e.g. 755) but rather the decimal representation of the octal value
        #   (e.g. 493).
        #
        #   @return [Integer, nil]
        optional :mode, Integer, api_name: :Mode

        # @!attribute options
        #   The options to be passed to the tmpfs mount. An array of arrays. Flag options
        #   should be provided as 1-length arrays. Other types should be provided as as
        #   2-length arrays, where the first item is the key and the second the value.
        #
        #   @return [Array<Array<String>>, nil]
        optional :options,
                 DockerEngineAPI::Internal::Type::ArrayOf[DockerEngineAPI::Internal::Type::ArrayOf[String]],
                 api_name: :Options

        # @!attribute size_bytes
        #   The size for the tmpfs mount in bytes.
        #
        #   @return [Integer, nil]
        optional :size_bytes, Integer, api_name: :SizeBytes

        # @!method initialize(mode: nil, options: nil, size_bytes: nil)
        #   Some parameter documentations has been truncated, see
        #   {DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::Mount::TmpfsOptions}
        #   for more details.
        #
        #   Optional configuration for the `tmpfs` type.
        #
        #   @param mode [Integer] The permission mode for the tmpfs mount in an integer.
        #
        #   @param options [Array<Array<String>>] The options to be passed to the tmpfs mount. An array of arrays.
        #
        #   @param size_bytes [Integer] The size for the tmpfs mount in bytes.
      end

      # The mount type. Available types:
      #
      # - `bind` a mount of a file or directory from the host into the container.
      # - `cluster` a Swarm cluster volume.
      # - `image` an OCI image.
      # - `npipe` a named pipe from the host into the container.
      # - `tmpfs` a `tmpfs`.
      # - `volume` a docker volume with the given `Name`.
      #
      # @see DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::Mount#type
      module Type
        extend DockerEngineAPI::Internal::Type::Enum

        BIND = :bind
        CLUSTER = :cluster
        IMAGE = :image
        NPIPE = :npipe
        TMPFS = :tmpfs
        VOLUME = :volume

        # @!method self.values
        #   @return [Array<Symbol>]
      end

      # @see DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::Mount#volume_options
      class VolumeOptions < DockerEngineAPI::Internal::Type::BaseModel
        # @!attribute driver_config
        #   Map of driver specific options
        #
        #   @return [DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::Mount::VolumeOptions::DriverConfig, nil]
        optional :driver_config,
                 -> {
                   DockerEngineAPI::ContainerCreateParams::Config::HostConfig::Mount::VolumeOptions::DriverConfig
                 },
                 api_name: :DriverConfig

        # @!attribute labels
        #   User-defined key/value metadata.
        #
        #   @return [Hash{Symbol=>String}, nil]
        optional :labels, DockerEngineAPI::Internal::Type::HashOf[String], api_name: :Labels

        # @!attribute no_copy
        #   Populate volume with data from the target.
        #
        #   @return [Boolean, nil]
        optional :no_copy, DockerEngineAPI::Internal::Type::Boolean, api_name: :NoCopy

        # @!attribute subpath
        #   Source path inside the volume. Must be relative without any back traversals.
        #
        #   @return [String, nil]
        optional :subpath, String, api_name: :Subpath

        # @!method initialize(driver_config: nil, labels: nil, no_copy: nil, subpath: nil)
        #   Optional configuration for the `volume` type.
        #
        #   @param driver_config [DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::Mount::VolumeOptions::DriverConfig] Map of driver specific options
        #
        #   @param labels [Hash{Symbol=>String}] User-defined key/value metadata.
        #
        #   @param no_copy [Boolean] Populate volume with data from the target.
        #
        #   @param subpath [String] Source path inside the volume. Must be relative without any back traversals.

        # @see DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::Mount::VolumeOptions#driver_config
        class DriverConfig < DockerEngineAPI::Internal::Type::BaseModel
          # @!attribute name
          #   Name of the driver to use to create the volume.
          #
          #   @return [String, nil]
          optional :name, String, api_name: :Name

          # @!attribute options
          #   key/value map of driver specific options.
          #
          #   @return [Hash{Symbol=>String}, nil]
          optional :options, DockerEngineAPI::Internal::Type::HashOf[String], api_name: :Options

          # @!method initialize(name: nil, options: nil)
          #   Map of driver specific options
          #
          #   @param name [String] Name of the driver to use to create the volume.
          #
          #   @param options [Hash{Symbol=>String}] key/value map of driver specific options.
        end
      end
    end

    class PortBinding < DockerEngineAPI::Internal::Type::BaseModel
      # @!attribute host_ip
      #   Host IP address that the container's port is mapped to.
      #
      #   @return [String, nil]
      optional :host_ip, String, api_name: :HostIp

      # @!attribute host_port
      #   Host port number that the container's port is mapped to.
      #
      #   @return [String, nil]
      optional :host_port, String, api_name: :HostPort

      # @!method initialize(host_ip: nil, host_port: nil)
      #   PortBinding represents a binding between a host IP address and a host port.
      #
      #   @param host_ip [String] Host IP address that the container's port is mapped to.
      #
      #   @param host_port [String] Host port number that the container's port is mapped to.
    end

    # @see DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig#restart_policy
    class RestartPolicy < DockerEngineAPI::Internal::Type::BaseModel
      # @!attribute maximum_retry_count
      #   If `on-failure` is used, the number of times to retry before giving up.
      #
      #   @return [Integer, nil]
      optional :maximum_retry_count, Integer, api_name: :MaximumRetryCount

      # @!attribute name
      #   - Empty string means not to restart
      #   - `no` Do not automatically restart
      #   - `always` Always restart
      #   - `unless-stopped` Restart always except when the user has manually stopped the
      #     container
      #   - `on-failure` Restart only when the container exit code is non-zero
      #
      #   @return [Symbol, DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::RestartPolicy::Name, nil]
      optional :name,
               enum: -> {
                 DockerEngineAPI::ContainerCreateParams::Config::HostConfig::RestartPolicy::Name
               },
               api_name: :Name

      # @!method initialize(maximum_retry_count: nil, name: nil)
      #   Some parameter documentations has been truncated, see
      #   {DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::RestartPolicy}
      #   for more details.
      #
      #   The behavior to apply when the container exits. The default is not to restart.
      #
      #   An ever increasing delay (double the previous delay, starting at 100ms) is added
      #   before each restart to prevent flooding the server.
      #
      #   @param maximum_retry_count [Integer] If `on-failure` is used, the number of times to retry before giving up.
      #
      #   @param name [Symbol, DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::RestartPolicy::Name] - Empty string means not to restart

      # - Empty string means not to restart
      # - `no` Do not automatically restart
      # - `always` Always restart
      # - `unless-stopped` Restart always except when the user has manually stopped the
      #   container
      # - `on-failure` Restart only when the container exit code is non-zero
      #
      # @see DockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig::RestartPolicy#name
      module Name
        extend DockerEngineAPI::Internal::Type::Enum

        EMPTY = :""
        NO = :no
        ALWAYS = :always
        UNLESS_STOPPED = :"unless-stopped"
        ON_FAILURE = :"on-failure"

        # @!method self.values
        #   @return [Array<Symbol>]
      end
    end

    class Ulimit < DockerEngineAPI::Internal::Type::BaseModel
      # @!attribute hard
      #   Hard limit
      #
      #   @return [Integer, nil]
      optional :hard, Integer, api_name: :Hard

      # @!attribute name
      #   Name of ulimit
      #
      #   @return [String, nil]
      optional :name, String, api_name: :Name

      # @!attribute soft
      #   Soft limit
      #
      #   @return [Integer, nil]
      optional :soft, Integer, api_name: :Soft

      # @!method initialize(hard: nil, name: nil, soft: nil)
      #   @param hard [Integer] Hard limit
      #
      #   @param name [String] Name of ulimit
      #
      #   @param soft [Integer] Soft limit
    end
  end

  class NetworkingConfig < DockerEngineAPI::Internal::Type::BaseModel
    # @!attribute endpoints_config
    #   A mapping of network name to endpoint configuration for that network. The
    #   endpoint configuration can be left empty to connect to that network with no
    #   particular endpoint configuration.
    #
    #   @return [Hash{Symbol=>DockerEngineAPI::Models::ContainerCreateParams::Config::NetworkingConfig::EndpointsConfig}, nil]
    optional :endpoints_config,
             -> {
               DockerEngineAPI::Internal::Type::HashOf[DockerEngineAPI::ContainerCreateParams::Config::NetworkingConfig::EndpointsConfig]
             },
             api_name: :EndpointsConfig

    # @!method initialize(endpoints_config: nil)
    #   Some parameter documentations has been truncated, see
    #   {DockerEngineAPI::Models::ContainerCreateParams::Config::NetworkingConfig} for
    #   more details.
    #
    #   NetworkingConfig represents the container's networking configuration for each of
    #   its interfaces. It is used for the networking configs specified in the
    #   `docker create` and `docker network connect` commands.
    #
    #   @param endpoints_config [Hash{Symbol=>DockerEngineAPI::Models::ContainerCreateParams::Config::NetworkingConfig::EndpointsConfig}] A mapping of network name to endpoint configuration for that network.

    class EndpointsConfig < DockerEngineAPI::Internal::Type::BaseModel
      # @!attribute aliases
      #
      #   @return [Array<String>, nil]
      optional :aliases, DockerEngineAPI::Internal::Type::ArrayOf[String], api_name: :Aliases

      # @!attribute dns_names
      #   List of all DNS names an endpoint has on a specific network. This list is based
      #   on the container name, network aliases, container short ID, and hostname.
      #
      #   These DNS names are non-fully qualified but can contain several dots. You can
      #   get fully qualified DNS names by appending `.<network-name>`. For instance, if
      #   container name is `my.ctr` and the network is named `testnet`, `DNSNames` will
      #   contain `my.ctr` and the FQDN will be `my.ctr.testnet`.
      #
      #   @return [Array<String>, nil]
      optional :dns_names, DockerEngineAPI::Internal::Type::ArrayOf[String], api_name: :DNSNames

      # @!attribute driver_opts
      #   DriverOpts is a mapping of driver options and values. These options are passed
      #   directly to the driver and are driver specific.
      #
      #   @return [Hash{Symbol=>String}, nil]
      optional :driver_opts,
               DockerEngineAPI::Internal::Type::HashOf[String],
               api_name: :DriverOpts,
               nil?: true

      # @!attribute endpoint_id
      #   Unique ID for the service endpoint in a Sandbox.
      #
      #   @return [String, nil]
      optional :endpoint_id, String, api_name: :EndpointID

      # @!attribute gateway
      #   Gateway address for this network.
      #
      #   @return [String, nil]
      optional :gateway, String, api_name: :Gateway

      # @!attribute global_i_pv6_address
      #   Global IPv6 address.
      #
      #   @return [String, nil]
      optional :global_i_pv6_address, String, api_name: :GlobalIPv6Address

      # @!attribute global_i_pv6_prefix_len
      #   Mask length of the global IPv6 address.
      #
      #   @return [Integer, nil]
      optional :global_i_pv6_prefix_len, Integer, api_name: :GlobalIPv6PrefixLen

      # @!attribute gw_priority
      #   This property determines which endpoint will provide the default gateway for a
      #   container. The endpoint with the highest priority will be used. If multiple
      #   endpoints have the same priority, endpoints are lexicographically sorted based
      #   on their network name, and the one that sorts first is picked.
      #
      #   @return [Integer, nil]
      optional :gw_priority, Integer, api_name: :GwPriority

      # @!attribute ip_address
      #   IPv4 address.
      #
      #   @return [String, nil]
      optional :ip_address, String, api_name: :IPAddress

      # @!attribute ipam_config
      #   EndpointIPAMConfig represents an endpoint's IPAM configuration.
      #
      #   @return [DockerEngineAPI::Models::ContainerCreateParams::Config::NetworkingConfig::EndpointsConfig::IpamConfig, nil]
      optional :ipam_config,
               -> {
                 DockerEngineAPI::ContainerCreateParams::Config::NetworkingConfig::EndpointsConfig::IpamConfig
               },
               api_name: :IPAMConfig,
               nil?: true

      # @!attribute ip_prefix_len
      #   Mask length of the IPv4 address.
      #
      #   @return [Integer, nil]
      optional :ip_prefix_len, Integer, api_name: :IPPrefixLen

      # @!attribute i_pv6_gateway
      #   IPv6 gateway address.
      #
      #   @return [String, nil]
      optional :i_pv6_gateway, String, api_name: :IPv6Gateway

      # @!attribute links
      #
      #   @return [Array<String>, nil]
      optional :links, DockerEngineAPI::Internal::Type::ArrayOf[String], api_name: :Links

      # @!attribute mac_address
      #   MAC address for the endpoint on this network. The network driver might ignore
      #   this parameter.
      #
      #   @return [String, nil]
      optional :mac_address, String, api_name: :MacAddress

      # @!attribute network_id
      #   Unique ID of the network.
      #
      #   @return [String, nil]
      optional :network_id, String, api_name: :NetworkID

      # @!method initialize(aliases: nil, dns_names: nil, driver_opts: nil, endpoint_id: nil, gateway: nil, global_i_pv6_address: nil, global_i_pv6_prefix_len: nil, gw_priority: nil, ip_address: nil, ipam_config: nil, ip_prefix_len: nil, i_pv6_gateway: nil, links: nil, mac_address: nil, network_id: nil)
      #   Some parameter documentations has been truncated, see
      #   {DockerEngineAPI::Models::ContainerCreateParams::Config::NetworkingConfig::EndpointsConfig}
      #   for more details.
      #
      #   Configuration for a network endpoint.
      #
      #   @param aliases [Array<String>]
      #
      #   @param dns_names [Array<String>] List of all DNS names an endpoint has on a specific network. This
      #
      #   @param driver_opts [Hash{Symbol=>String}, nil] DriverOpts is a mapping of driver options and values. These options
      #
      #   @param endpoint_id [String] Unique ID for the service endpoint in a Sandbox.
      #
      #   @param gateway [String] Gateway address for this network.
      #
      #   @param global_i_pv6_address [String] Global IPv6 address.
      #
      #   @param global_i_pv6_prefix_len [Integer] Mask length of the global IPv6 address.
      #
      #   @param gw_priority [Integer] This property determines which endpoint will provide the default
      #
      #   @param ip_address [String] IPv4 address.
      #
      #   @param ipam_config [DockerEngineAPI::Models::ContainerCreateParams::Config::NetworkingConfig::EndpointsConfig::IpamConfig, nil] EndpointIPAMConfig represents an endpoint's IPAM configuration.
      #
      #   @param ip_prefix_len [Integer] Mask length of the IPv4 address.
      #
      #   @param i_pv6_gateway [String] IPv6 gateway address.
      #
      #   @param links [Array<String>]
      #
      #   @param mac_address [String] MAC address for the endpoint on this network. The network driver might ignore th
      #
      #   @param network_id [String] Unique ID of the network.

      # @see DockerEngineAPI::Models::ContainerCreateParams::Config::NetworkingConfig::EndpointsConfig#ipam_config
      class IpamConfig < DockerEngineAPI::Internal::Type::BaseModel
        # @!attribute i_pv4_address
        #
        #   @return [String, nil]
        optional :i_pv4_address, String, api_name: :IPv4Address

        # @!attribute i_pv6_address
        #
        #   @return [String, nil]
        optional :i_pv6_address, String, api_name: :IPv6Address

        # @!attribute link_local_ips
        #
        #   @return [Array<String>, nil]
        optional :link_local_ips,
                 DockerEngineAPI::Internal::Type::ArrayOf[String],
                 api_name: :LinkLocalIPs

        # @!method initialize(i_pv4_address: nil, i_pv6_address: nil, link_local_ips: nil)
        #   EndpointIPAMConfig represents an endpoint's IPAM configuration.
        #
        #   @param i_pv4_address [String]
        #   @param i_pv6_address [String]
        #   @param link_local_ips [Array<String>]
      end
    end
  end
end

Instance Attribute Details

#host_configDockerEngineAPI::Models::ContainerCreateParams::Config::HostConfig?

Container configuration that depends on the host we are running on



60
61
62
# File 'lib/docker_engine_api/models/container_create_params.rb', line 60

optional :host_config,
-> { DockerEngineAPI::ContainerCreateParams::Config::HostConfig },
api_name: :HostConfig

#networking_configDockerEngineAPI::Models::ContainerCreateParams::Config::NetworkingConfig?

NetworkingConfig represents the container’s networking configuration for each of its interfaces. It is used for the networking configs specified in the ‘docker create` and `docker network connect` commands.



70
71
72
# File 'lib/docker_engine_api/models/container_create_params.rb', line 70

optional :networking_config,
-> { DockerEngineAPI::ContainerCreateParams::Config::NetworkingConfig },
api_name: :NetworkingConfig