Hello,

Following on from the various docker discussions I wanted to mention an
approach of building a docker image based on the current development
workspace using gradle.

Please give it a try - danwatford/ofbiz-framework at docker-from-gradle
(github.com)
<https://github.com/danwatford/ofbiz-framework/tree/docker-from-gradle>

I have run these steps on a Windows 10 PRO machine, running commands from
git-bash.

To build the ofbiz image:
./gradlew --no-daemon buildDockerImage

This will create an image, tagged ofbiz:latest, based on the current
workspace with all demo data loaded.

To run the image in a container:
docker run -it --rm --publish 8080:8080 --publish 8443:8443 ofbiz:latest

Visit https://localhost:8443/partymgr
Username / Password: admin / ofbiz

The above container will be deleted when the process is terminated.

The approach of building the image from the current workspace might be
useful as a way of quickly testing out PR merges.
Further, by building from gradle we can change the content of the docker
image based on build properties or environment variables. For example
we could build multiple images with various database drivers already
included (where licensing permits).

I wonder if the dev community sees any value in the gradle build approach
compared to manually creating Dockerfiles either directly in the
ofbiz-framework sources or held in another repository.

Thanks,

Dan.

-- 
Daniel Watford

Reply via email to