mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-27 19:43:34 +00:00
feat: Add support for compose devices mappings (#250)
* feat: Add support for compose `devices` mappings https://docs.docker.com/reference/compose-file/services/#devices ``` services: foo: devices: - "/dev/ttyUSB0:/dev/ttyUSB0" - "/dev/sda:/dev/xvda:rwm" ``` * Lint fix
This commit is contained in:
@@ -383,6 +383,12 @@ func (s *ContainerSpec) Clone() ContainerSpec {
|
||||
if s.Resources.Ulimits != nil {
|
||||
spec.Resources.Ulimits = maps.Clone(s.Resources.Ulimits)
|
||||
}
|
||||
if s.Resources.DeviceMappings != nil {
|
||||
spec.Resources.DeviceMappings = slices.Clone(s.Resources.DeviceMappings)
|
||||
}
|
||||
if s.Resources.DeviceReservations != nil {
|
||||
spec.Resources.DeviceReservations = slices.Clone(s.Resources.DeviceReservations)
|
||||
}
|
||||
return spec
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user