Could I update/modify a configuration file inside a docker image container prior to launching it via cattle service?
We don’t have any functionality to do that, can you tell me your usecase so we can give you advice on how to deal with it? Usually you don’t edit anything inside, but use dynamic configurations (service discovery) to generate (config) files to suit your need.
Agree with superseb.
You can also define a Dockerfile based on your image and inclue an entrypoint. This entrypointis a shell file in which you can modify elements from your container.
Example of Dockerfile:
FROM node:4.4.5 ADD entrypoint.sh / RUN chmod 777 /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"]
And entrypoint.sh looks like:
#!/bin/bash ... do what you want here npm start