Pass the correct working_dir to the container config, and compare containers for working dir changes

We were getting the correct working dir from the compose or image config, but not really using it.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
This commit is contained in:
Pablo Carranza Velez 2018-03-14 15:41:19 -03:00
parent 44e5778acc
commit 557b6a8d07

View File

@ -523,6 +523,7 @@ module.exports = class Service
ipc: container.HostConfig.IpcMode ipc: container.HostConfig.IpcMode
macAddress: container.Config.MacAddress macAddress: container.Config.MacAddress
user: container.Config.User user: container.Config.User
workingDir: container.Config.WorkingDir
} }
# I've seen docker use either 'no' or '' for no restart policy, so we normalise to 'no'. # I've seen docker use either 'no' or '' for no restart policy, so we normalise to 'no'.
if service.restartPolicy.Name == '' if service.restartPolicy.Name == ''
@ -584,6 +585,7 @@ module.exports = class Service
Labels: @labels Labels: @labels
Domainname: @domainname Domainname: @domainname
User: @user User: @user
WorkingDir: @workingDir
HostConfig: HostConfig:
Memory: @memLimit Memory: @memLimit
MemoryReservation: @memReservation MemoryReservation: @memReservation
@ -687,6 +689,7 @@ module.exports = class Service
'ipc' 'ipc'
'macAddress' 'macAddress'
'user' 'user'
'workingDir'
] ]
arraysToCompare = [ arraysToCompare = [
'volumes' 'volumes'