HUB
Sign inSign up

krunalsabnis/spring-java-build

By krunalsabnis

•Updated almost 9 years ago

simple and easy to use Java 8 gradle build machine to clone source code and run gradle build

Image
0

1.4K

krunalsabnis/spring-java-build repository overview

This build machine can be useful if you have below in your mind

  • You want to share Git repository source code with someone and want to make it easy for them to build.
  • You don't want to worry about build environment setup and be sure that build do not break because of it
  • You want to give a very short "build instructions"

Once the container is up you should see build logs on screen (as per below command run) and once the build is finish container remains up. You can trigger more builds to it by using docker's exec command and calling a script with parameters. Please see below re-trigger section.

Usage: docker run --name {any-name-for-your-local-container} -e GIT_REPO_URL='{git url of gradle based java/spring source code}' -e DOCKER_PATH='{path-on-container-filesystem where git will clone and gradle build is run}' -i -v {your-local-dir}:{path-on-container-filesystem} krunalsabnis/spring-java-build:0.0.5

Explanation:

  • GIT_REPO_URL={git url of gradle based java/spring source code} Git repository URL that will be cloned
  • DOCKER_PATH={path-on-container-filesystem where git will clone and gradle build is run} It is mandatory to attach volume while running this container and the path where volume is mapped should go here
  • -v [your-local-dir]:[path-on-container-filesystem] It is mandatory to attached volume as source code will be cloned here and build process will generate build jar and other files at this path so out side container you can use built application. May be to run in another container for testing, development etc.

Example:

For my sample spring boot application [ https://github.com/krunalsabnis/qualibrate-java-api.git⁠ ]

docker run --name mb -e GIT_REPO_URL='https://github.com/krunalsabnis/qualibrate-java-api.git⁠' -e DOCKER_PATH='/shared-volume' -i -v E:\code-repo\DockerWork:/shared-volume krunalsabnis/spring-java-build:0.0.5

Re-trigger Usage: docker exec -i {container-name} build.sh {GIT_REPO_URL} {} docker exec -i mb build.sh {git url of gradle based java/spring source code} {path-on-container-filesystem where git will clone and gradle build is run}

Example:

docker exec -i mb build.sh https://github.com/krunalsabnis/qualibrate-wiki.git⁠ /shared-volume

  • More details to be added *

Tag summary

Content type

Image

Digest

Size

483.1 MB

Last updated

almost 9 years ago

docker pull krunalsabnis/spring-java-build