0

Starting from the io8 maven archetype, I'm setting up a Docker container containing a Karaf container containing a CXF restful web service.

I want this to read a file when it starts up that parameterizes it. What's the procedure for setting up (a) a Docker container so that it can receive a config file when launched, and (b) finding that file from inside?

bmargulies
  • 97,814
  • 39
  • 186
  • 310

1 Answers1

1

To provide a configuration file to a container you can use something like the following: docker run -d -v /path/to/your/config.file:/path/inside/the/container/config.file yourimage

For more information please refer the official documentation on how to use volumes.

Henrik Sachse
  • 51,228
  • 7
  • 46
  • 59