docker-client icon indicating copy to clipboard operation
docker-client copied to clipboard

How to remove all secrets from a service

Open marcomsousa opened this issue 7 years ago • 3 comments

Not a bug!

¿How to remove all secrets from a service? Without losing labels, networks, anything.

In docker tools it's easy: docker service update --secret-rm SECRETS_NAME SERVICE_NAME

Docker-client I not know how to do it

ServiceSpec spec = ServiceSpec.builder()
		        .name(service.spec().name())
		        .taskTemplate(service.spec().taskTemplate())
		        .mode(service.spec().mode())
		        .endpointSpec(service.spec().endpointSpec())
		        .updateConfig(service.spec().updateConfig())
		        .build();

docker.updateService(service.id(), service.version().index(), spec);

¿ Secrets is an ImmutableList<SecretBind> ?

marcomsousa avatar Mar 26 '18 10:03 marcomsousa

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 24 '18 13:09 stale[bot]

+1

marcomsousa avatar Sep 24 '18 15:09 marcomsousa

Hi @marcomsousa

Since this project went on mature status, please re-open this issue (if it still stands) to https://github.com/dmandalidis/docker-client. Thanks

dmandalidis avatar Oct 01 '19 20:10 dmandalidis