Editing a Service's Container Files

So this seems like a seemingly straightforward task but I can’t seem to figure this one out. So I have a swarm deployed with 10+ services each with 1 replica each for development purposes.

One of the services is a web server and I’m trying to replace some unpackaged files with changed ones from my host. Anyways I’m trying to figure out how to access the web server service’s container and edit the files in that container.

Any feedback is greatly appreciated

Changing the contents of running containers is a bad idea. Instead, you should update the container image and re-deploy.

Having said that, you can access all the hosts, run docker -ti exec <containerid> powershell and mess around with the filesystem contents.

Sorry for the delayed response. Yes, I know that updating the container image is the proper way of doing it ( This is what I do currently) however it does take significantly longer to deploy that way by waiting for the container to restart. Thank you so much for posting that command I’ll give it a try.

Thank you!