mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-02-21 10:01:55 +00:00
Fix dockerode type failures
Signed-off-by: Cameron Diver <cameron@balena.io>
This commit is contained in:
parent
8424fb44f6
commit
76e0361b0e
@ -448,7 +448,7 @@ export class Service {
|
||||
|
||||
// We cannot use || for this value, as the empty string is a
|
||||
// valid restart policy but will equate to null in an OR
|
||||
let restart = (container.HostConfig.RestartPolicy || {}).Name;
|
||||
let restart = _.get(container.HostConfig.RestartPolicy, 'Name');
|
||||
if (restart == null) {
|
||||
restart = 'always';
|
||||
}
|
||||
@ -462,7 +462,9 @@ export class Service {
|
||||
// the entire ContainerInspectInfo object, or upstream the extra
|
||||
// fields to DefinitelyTyped
|
||||
svc.config = {
|
||||
networkMode: container.HostConfig.NetworkMode,
|
||||
// The typings say that this is optional, but it's
|
||||
// always set by docker
|
||||
networkMode: container.HostConfig.NetworkMode!,
|
||||
|
||||
portMaps,
|
||||
expose,
|
||||
|
Loading…
x
Reference in New Issue
Block a user