juneau-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stian Soiland-Reyes <st...@apache.org>
Subject Re: Running maven within Dockerfile.
Date Wed, 16 Oct 2019 14:22:59 GMT
On Mon, 14 Oct 2019 15:46:59 +0200, Ayeshmantha Perera <akayeshmantha@gmail.com> wrote:
> It's possible to run the maven build from the same docker file. But
> normally on CI/CD pipelines, we are doing the build first and then creating
> the docker images.
> 
> Regards
> Ayesh
> 
> On Mon, Oct 14, 2019 at 3:26 PM James Bognar <jamesbognar@apache.org> wrote:
> 
> > Ishita is suggesting that the Dockerfile for the petstore app run
> > maven to build the component.  I don't think I've ever seen this done
> > before.  Does anyone have any feedback on that request?
> >

I think it's a good idea to have it, just not to require it.

We do this in another project, it's nice in that you get consistent
Maven and JDK version and that the Docker image can be auto-built on
changes to the code, and can depend on native stuff (e.g. Python
scripts called from Java)

It's not so convenient in that the result of the compilation is trapped
inside the Docker image - but that's not an issue if the goal is to make
a web-server or command line container.

See for instance:
https://github.com/common-workflow-language/cwlviewer/blob/master/Dockerfile

(Apache license, feel free to borrow)

There we actually use that again from Docker Compose because it needs a
database etc - but that is presumably not needed by the petstore app.
https://github.com/common-workflow-language/cwlviewer/blob/master/docker-compose.yml



-- 
Stian Soiland-Reyes
https://orcid.org/0000-0001-9842-9718


Mime
View raw message