Skip to content

Commit

Permalink
Merge pull request #34 from leonitousconforti/main
Browse files Browse the repository at this point in the history
Add devices to buildHostConfig
  • Loading branch information
apocas authored Oct 11, 2023
2 parents 50518c6 + 4849c51 commit 2c34de6
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 2c34de6

Please sign in to comment.