Sorry I misunderstood the initial question, I thought you were looking for runtime config management.
To include the conf file in the build image, you can edit the src/main/docker/assembly.xml and include your myconf.json config file, for example:
<assembly>
<dependencySets>
<dependencySet>
<includes>
<include>:${project.artifactId}</include>
</includes>
<outputDirectory>.</outputDirectory>
</dependencySet>
</dependencySets>
<files>
<file>
<outputDirectory>.</outputDirectory>
<source>conf/myconf.json</source>
</file>
</files>
</assembly>
You can then edit the pom.xml to update the docker image configuration XML exec clause to :
<cmd>
<exec>
<arg>vertx</arg>
<arg>run</arg>
<arg>${
verticle.name}</arg>
<arg>-cp</arg>
<arg>/usr/verticles/${project.artifactId}-${project.version}.jar</arg>
<arg>-conf</arg>
<arg>/usr/verticles/myconf.json</arg>
</exec>
</cmd>
It works for me on a local docker and it seems it's baked into the image, it should also work on fabric8
-- raphael
> Le 16 juin 2016 à 11:51, Tim Fox <
timv...@gmail.com> a écrit :
>
> Thanks, but not sure how to do that with the f8 example, as it's all controlled by Maven:
>
>
https://github.com/vert-x3/vertx-examples/tree/master/docker-examples/vertx-docker-example-fabric8
>
> On Thursday, 16 June 2016 10:30:37 UTC+1, Raphaël Luta wrote:
> You need to mount it into the container at runtime with docker run -v option. It can work directly with a file.
>
> For docker deployment, I typically run a wrapper script before vert.x that fetches config from an URL and interpolate ENV variables in the config before actually running vert.x.
>
> -- raphael
>
> > Le 16 juin 2016 à 11:23, Tim Fox <
timv...@gmail.com> a écrit :
> >
> > Hi,
> >
> > I'm trying to adapt the docker f8 example to build a docker image that runs the verticle with a -conf some/path/to/conf.json on the command line.
> >
> > I can't for the life of me figure out how to include the conf.json file in the docker image to get this to work.
> >
> > Any ideas?
> >
> > --
> > You received this message because you are subscribed to the Google Groups "vert.x" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to
vertx+un...@googlegroups.com.
> --
> You received this message because you are subscribed to the Google Groups "vert.x" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
vertx+un...@googlegroups.com.
> To view this discussion on the web, visit
https://groups.google.com/d/msgid/vertx/00bb91d3-c6f6-41eb-8c7c-6c5be5db0894%40googlegroups.com.