I am fighting with automating smth with docker SDK for python. All went well until I need to run the following command:
docker service update --config-rm "$OLD_CONFIG"\
--config-add source="$NEW_CONFIG",target=/usr/local/tomcat/shared/classes/config.cfg,mode=0440\
busybox_busybox
There is a code reference - SDK services
Here is my code:
...
client = docker.DockerClient(docker_server)
client.configs.create(name=new_config, data=data) - success
svc = client.services.get("busybox_busybox") - success
svc.update(image="nginx)
however, I can't understand how to pass these options "--config-rm abc" and "--config-add"
PS: I was able to create an external config but unable to update service by removing the old one and attaching the one I have created just a line ago