Skip to content

Commit

Permalink
Add devices to buildHostConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
leonitousconforti authored Jul 17, 2023
1 parent 3953a19 commit 4849c51
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/servicesTools.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,13 @@ module.exports = {
if (service.ports !== undefined) {
this.buildPorts(service.ports, output);
}

if (service.devices !== undefined) {
output.Devices = service.devices.map((device) => ({
CgroupPermissions: "mrw",
PathInContainer: device,
PathOnHost: device,
}));
}
if (service.cpu_count !== undefined) {
output.CpuCount = service.cpu_count;
}
Expand Down

0 comments on commit 4849c51

Please sign in to comment.