docker service update pass options
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7.2k
- Forks
- 1.7k
- Avg merge
- 13d 8h
- Merged PRs (30d)
- 2
Description
Hey guys,
I just gave up, I am trying to repeat 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
using Docker SDK for Python doc
...
client = docker.DockerClient(docker_server)
client.configs.create(name=new_config, data=data) - success
svc = client.services.get("busybox_busybox") - success
svc.update(!!!!!!!!!!!!)
and I can't understand how to pass these options "--config-rm abc" and "--config-add"
ps: I was able to create a external config but unable to update service by removing the old one and attaching the one i have created just a line ago
svc.update(image="nginx")
svc.update(command=["sh", "-c", "echo"]) - works fine but now the options I want to use
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Service objects documentation and the svc.update entry point. Compare the Docker CLI --config-rm and --config-add operation with the update arguments exposed by the Python SDK, then verify that the service can remove the old config and attach the newly created one.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, python
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100