Skip to content

docker service update and scale not working, easy fix inside #21

@dmitriikeler

Description

@dmitriikeler

docker service scale
Do not need to call docker_service_flags.rb function to compose service flags variable.
A simple fix is to change $exec_scale to "${docker_command} scale ${service_name}=${replicas}"

docker service update
docker_service_flags.rb checks if host_socket param is a string with value 'undef' and adds a flag with host_socket value if it is not. Since host_socket parameter is not passed when the function is called it is empty, so docker_service_flags always adds -H ''' to update command

host_socket parameter should be added when calling the function
$docker_service_flags = docker_service_flags({
detach => $detach,
env => $env,
service_name => $service_name,
label => $label,
publish => $publish,
replicas => $replicas,
tty => $tty,
user => $user,
workdir => $workdir,
extra_params => any2array($extra_params),
image => $image,
host_socket => $host_socket,
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions