Search code examples
gradlespring-bootbuild.gradledockerfiledocker-cloud

Setup Continuous Integration with docker cloud and spring boot


I'm trying to setup Continuous Integration with docker cloud and spring boot app. I want to use repository feature of docker cloud and build new container when new push occurs in some branch.

But I can't write correct Dockerfile because built jar file is nowhere to found.

FROM frekele/gradle
VOLUME /tmp
WORKDIR /app
ADD . /app
RUN gradle clean build
CMD java -jar app.jar
ADD some-app.jar app.jar

I have tried also build/libs/some-app.jar

Please advice me what can be done or what I'm doing wrong.

Thank you


Solution

  • I've just decided to use Jenkins with docker slave to build project (jar) and then build docker image with that jar and push it the docker hub.

    As far this is more simple and obvious solution